• 🏆 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!

[Unsolved] Weapon Critical Effect - not random?

Status
Not open for further replies.
Level 4
Joined
Jul 9, 2007
Messages
50
Hi guys,

in my TD i have a tower that has 20% chance to stun its target, shooting a different projectile. so i created 2 missile launch effects, one just deals damage on impact, the other deals damage and applies a behaviour that disables all abilities. for the weapon of my tower i set the effect to the normal missile launch and the critical effect to the stunning missile launch, and the critical chance to 0.2

the problem is that when the tower attacks it either stuns its target with EVERY hit or it never stuns it, depending on which unit i attack...
i want the effect to be random on every hit

is the randomiser broken or did i miss something in my setup?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Maybe post a map with the problem being re-creatable. I have no experience with critical effect mechanics so would need to mess around with it a bit.

If not for the variances in missile art it would be easy to do with a simple impact set and giving the add behaviour a chance to apply.

If worst comes to worst you can always use a trigger enhanced solution. You get the weapon to use a dummy set effect which then runs a trigger. The trigger then has a 20% chance to launch the stun missile effect otherwise it uses the normal missile effect. This is likely less efficient than a data solution so should only be done as a last resort.
 
Level 4
Joined
Jul 9, 2007
Messages
50
ok i tried to recreate the problem:
i created a testmap and gave the photon cannon a 50% chance to attack like a stalker and.... it works as it should
i did the same in my map and it works as well, so i compared my weapon to the photon cannon one and copied all fields.... still the same problem
then i realised my weapon type is strafe while the photon cannon's type is legacy
when i change my weapon to legacy it works all fine

where is the difference between the two?

it seems the critical effect only works properly for legacy type weapons
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
where is the difference between the two?
Strafe forces the unit to continuously move to use the weapon. This is seen by the Interceptor of the Protoss Carrier.
Legacy is your bog standard weapon used by pretty much all units.

I think the reason it is called Legacy was it is very similar to WC3 and typical RTS style unit attacks.
 
Status
Not open for further replies.
Top