Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - gzuk

Pages: [1]
1
Development / Make 2nd hero un-attackable by 1st hero
« on: September 15, 2022, 09:37:01 AM »
Hi, I tried out the new multiple heroes feature, but the default seems to be a player vs. player setup. The heroes hurt each other with their attacks, as in the "friendly fire" test map. For a coop quest, it would be nicer if you could also configure them to be immune to each other's attacks.

There are functions on the "enemy" type to configure attack reaction (set_attack_consequence), but these functions don't seem to exist on the "hero" type. In the CPP files, there are even more functions (is_sword_ignored), but it seems they have no Lua bindings.

Have I maybe overlooked an easy way to set this up? Or could it be implemented easily?

2
Development / Have a 2nd hero move, attack and be attacked
« on: September 08, 2022, 10:04:02 AM »
Hi, I'm trying to implement a 2nd hero for co-op gaming. It's just for laughs, and I know the engine isn't really made for that. So far, I only managed to have a custom entity walk around with the WASD keys, and spawn projectiles with the Ctrl key. However, I can only seem to make the projectiles traverse enemies, or disappear when they hit one.

How can I make the spawned projectiles hurt the enemies, as projectiles from the hero would?

Is there a way to have the enemies and enemy projectiles hurt the custom entity, like they would with the hero?

Since the 2nd hero should behave pretty much like the 1st hero, only with other keys, is there any Lua script for the hero I could copy from? Or is it all in the C++ files?

Many thanks for some hints!  :)

Pages: [1]