• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Effects on Battleships Weapons (detecting Phoenix Fire)

Status
Not open for further replies.
Level 3
Joined
Dec 18, 2008
Messages
36
I'm having trouble with the phoenix fire ability. The regular boring battleships mechanics work fine, my missile fires at a random target within range every x seconds.

But when I've read about adding special effects to the skills they always seem to start like this:

Events:
Unit - Starts the effect of an ability.
Conditions:
(ability being cast) is equal to (phoenix fire ability)
Actions:
(display test message)

The phoenix fire, when fired, never makes it into the actions of this trigger. I want to add more fun stuff to my weapons and ill need to be able to detect the firing of phoenix fire in order to accomplish this.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
I think that triggers can't detect passive abilities at all, you will have to make "fun" abilities completely triggered. Like this:
  • Events
    • Time - every 5.0 seconds
  • Actions
    • Pick every unit in (Units with "Fun Gun" in inventory)
      • Create dummy at (picked unit position)
      • Order dummy to "do something funny" to (random unit from(units in 500 range from (picked unit position) )
      • Add expiration timer do dummy
This trigger is very leaky, don't use it as it is.
 
Level 3
Joined
Dec 18, 2008
Messages
36
Thanks Mort! I was thinking that I would finally have to break and use dummies. My only concern about this style of trigger would be that every one who has the same type of weapon will fire at the same time. I hope this side affect wont be too noticeable.
 
Level 12
Joined
Apr 15, 2008
Messages
1,063
The easiest way to get rid of that is to use timer instead of "elapsed game time".
Then, in every trigger run, you only let a single player fire, and set the timer to (reload time/number of players with it). This will make all of them fire at different times. They will still fire regullary, but unless all such players are on the same spot, it won't be noticable.

You can archieve that also by adding
  • Wait (RELOAD_TIME/number of players with the gun) seconds
inside the loop. It will only fire a bit irregullary when someone buys or sells the gun (only for that single run, otherwise it's fine)
 
Level 3
Joined
Dec 18, 2008
Messages
36
I will have to test this out in a game with my clannies. They can be particular about how a weapon "feels."

I would rather handle each instance of the gun separately, but that would be even more complex; I'm just not sure if it's worth it for my purposes.

Thanks again!
 
Status
Not open for further replies.
Top