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.

Show posts Menu

Topics - gzuk

Hello, I read on the forums that you could use the new module coroutine_helper.lua to build cutscenes, to avoid endlessly nested callbacks.

However, I couldn't get it to work. I could only get one-time events to work, like playing a sound. I couldn't get the "only if game available" features to work, probably because I didn't make the game available in the right way.

Is there perhaps a working coroutine_helper game or example available, that uses the more complicated "only if game available" features, like dialogue, or characters moving around?

Many thanks for an answer!  :)
Development / Make 2nd hero un-attackable by 1st hero
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?
Development / Have a 2nd hero move, attack and be attacked
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!  :)