xolatgames

joined 2 months ago
[โ€“] [email protected] 1 points 8 hours ago

I think that doesn't respectful to stay in this community for myself. Have a nice day! โœŒ๐Ÿผ

[โ€“] [email protected] 1 points 4 days ago

Thanks so much! ๐Ÿ‘๐Ÿผ

[โ€“] [email protected] 1 points 4 days ago

But thanks to you! ๐Ÿ˜„

[โ€“] [email protected] 1 points 4 days ago

What's the best encryption algorithm in your opinion?

[โ€“] [email protected] 2 points 4 days ago* (last edited 4 days ago) (1 children)

Let's solve the first part then.

But I guess that @herzenschein already suggested me a solution...

You could take inspiration from Theodore Tsoโ€™s pwgen: https://github.com/tytso/pwgen

[โ€“] [email protected] 0 points 4 days ago (2 children)

Asking to do a homework.

 

Hi! โœŒ๏ธ I need to generate some string in C++ with random characters that can use all letters from "a" to "z" (include capital letters), and all numbers from 0 to 9 there.

And for examples this should looks somehow like this:

SnHXAsOC5XDYLgiKM5ly

Also I want to encrypt that string then by itself:

SnHXAsOC5XDYLgiKM5ly encrypt with SnHXAsOC5XDYLgiKM5ly key.

So, how can I do this in C++? ๐Ÿค”

Thanks in advance!

[โ€“] [email protected] 1 points 2 months ago

I personally don't know ๐Ÿคท๐Ÿปโ€โ™‚๏ธ. I've try both variants.

[โ€“] [email protected] 1 points 2 months ago (2 children)

Thanks a lots, folks! ๐Ÿ˜„ Everything works fine now ๐Ÿ‘๐Ÿผ

Image

What I have to do:

  1. Made don't only materials, but also meshes as unique:
var new_model = model.front.duplicate(true)
var new_ship: Node3D = new_model.instantiate()
new_ship.position = front_model_pos
_model_parent.add_child(new_ship)
_make_ship_materials_unique(new_ship)
  1. Change mesh.surface_set_material to mesh.set_surface_override_material:
func _make_ship_materials_unique(new_ship: Node3D) -> void:
	for i in new_ship.get_children(true):
		if i is MeshInstance3D:
			for n in range(i.get_surface_override_material_count()):
				i.set_surface_override_material(n, i.mesh.surface_get_material(n).duplicate(true))
func damaged_spec_effect() -> void:
	for i in ship.get_children(true):
		if i is MeshInstance3D:
			for n in range(i.get_surface_override_material_count()):
				_create_fade_in_then_out_effect(i.get_surface_override_material(n), Color.RED)

And everything started works as well. Thanks again ๐Ÿค๐Ÿผ

 

Some objects sticks with each other when those use CharacterBody2D, and moves like those are sticking together.

So, what do I need to do to solve this issue?

9
submitted 2 months ago* (last edited 2 months ago) by [email protected] to c/[email protected]
 

Hi, folks! So, I have the problem with making materials as unique.

Image

I need effects, such as painting of ships in red color, will applies only where particles will spawns. But... As you can see those effects can applies also into other ships.

I've already set these materials as "Local to Scene" into inspector tab.

And have create script for making those materials as unique:

func _make_ship_materials_unique() -> void:
	for i in ship.get_children():
		if i is MeshInstance3D:
			for n in range(i.get_surface_override_material_count()):
				i.mesh.surface_set_material(n, i.mesh.surface_get_material(n).duplicate(true))

But it given me few results ๐Ÿ˜•

If it can help, here's the script of applying of ships painting:

func damaged_spec_effect() -> void:
	for i in ship.get_children():
		if i is MeshInstance3D:
			for n in range(i.get_surface_override_material_count()):
				_create_fade_in_then_out_effect(i.mesh.surface_get_material(n), Color.RED)
func _create_fade_in_then_out_effect(material: Material, final_color: Color) -> void:
	if material is StandardMaterial3D:
		material.albedo_color = Color.WHITE
		var tween = get_tree().create_tween()
		tween.tween_property(material, "albedo_color", final_color, EFFECTS_DURATION / 2)
		tween.tween_property(material, "albedo_color", Color.WHITE, EFFECTS_DURATION / 2)

So, what do I need to do for solving my problem? ๐Ÿค”

view more: next โ€บ