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

[Trigger] Smoke Grenade

Status
Not open for further replies.
Level 7
Joined
Sep 24, 2008
Messages
281
I know that this is probably quite simple, but how can you increase the scale of a doodad over a period of time? Essentially, I wish to create a short of smoke grenade, which will mask an area over time, and dissorient zombies. Any help on the general concept would be great.
More detail:
-will be thrown, possibly using a bouncing system.
-smoke's growth rate will increase dramitically until at scale 1.2
-any zombies currently chasing the thrower, or other players for that matter, which are within the smoke will be dissoriented untill the smoke clears
-not an ability, but an item

Any ideas? Thanks in advance, :grin:
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Instead of a destructable/doodad, create a dummy unit with the model and increase his size :/
(dummy unit has the abilities "Locust" and "invulnerable (neutral)", you don't need anything else I think ^^).

Edit: do you want the spell as well, or you only wanted to increase the size of a destructable or a doodad? :/
 
Level 7
Joined
Sep 24, 2008
Messages
281
Instead of a destructable/doodad, create a dummy unit with the model and increase his size :/
(dummy unit has the abilities "Locust" and "invulnerable (neutral)", you don't need anything else I think ^^).

Edit: do you want the spell as well, or you only wanted to increase the size of a destructable or a doodad? :/

Any advice on the concept as a whole would be greatly appreciated aswell.
What is the trigger for increasing a unit's size?:confused:
 
Level 7
Joined
Sep 24, 2008
Messages
281
Animation - Scale

:eek:

Thank you. Now, I require some help regarding the bouncing system.

-The player will select a location (the initial landing point of the grenade.)
-Once the smoke grenade is thrown, it will bounce three times, settle, and then release the smoke cloud.
-Any zombies within the blast will be confused (for five seconds) untill the smoke clears.

Could you possibly recomend a bouncing system which I can use as a base?
 
Last edited:
Level 7
Joined
Sep 24, 2008
Messages
281
Alright, thanks.

How would I create a unit 300 units away from the first bouncing point, in the direction the grenade was thrown?
-I have the distance value (1/3 of the origional distance)
-I have the angle (angle from position of hero manipulating item to the target point of issued order.)

problem 2: does "target point of issued order" also apply when an item is used (you must target a point when using the item):confused:
problem 3: what would be a good item ability which does nothing, but is not an AOE, and can target the ground?
here's what I have so far-
  • Events
    • Unit - A unit Uses an item
  • Conditions
    • (Item-type of (Item being manipulated)) Equal to Smoke Grenade
  • Actions
    • Set Throw_Angle = (Angle from Smoke_Point1 to Smoke_Point2)
    • Set Bounce_Distance = ((Distance between Smoke_Point1 and Smoke_Point2) / 3.00)
    • Set Smoke_Point1 = (Position of (Hero manipulating item))
    • Set Smoke_Point2 = (Target point of issued order)
    • Unit - Create 1 dummy unit for Neutral Passive at Smoke_Point1 facing Default building facing degrees
    • Set SmokeUnit1 = (Last created unit)
    • Unit - Add grenade projectile to SmokeUnit1
    • Unit - Add a 1.00 second Generic expiration timer to SmokeUnit1
    • Unit - Create 1 dummy unit (no locust) for Neutral Passive at Smoke_Point2 facing Default building facing degrees
    • Set SmokeUnit2 = (Last created unit)
    • Unit - Add grenade projectile to SmokeUnit2
    • Unit - Add a 1.00 second Generic expiration timer to SmokeUnit1
 
Last edited:
Level 8
Joined
Apr 7, 2008
Messages
176
*First I dunno if that throw angle would set right, since its being set B4 the smoke points.
*You would have to create another point like the Bounce Distance to the second bounce of the grenade.
*You dont want to create that dummy yet.... It will make it appear B4 the grenade reaches the target.
*I dunno if you know about leaks...?? But you have to remove these points with a custom script after you set them.
call RemoveLocation (udg_Bounce_Distance)

Now for how to do it....
You need to give the Hero a spell that just tosses a useless grenage model. When it lands, have an invisible dummy witht the same spell cast it on the Bounce_Distance2 that you will create. When IT lands have a new Dummy cast the REAL spell on the Target Point (Smoke_Point2), And when it is created, set ownership of it to (Owner of unit(Triggering unit)) or something like that. SO that the caster gets XP for kills if any damage is caused.
Do you know about MUI?
 
Last edited:
Level 8
Joined
Apr 7, 2008
Messages
176
Also another way to do it.
Because this is going to take so much time its going to have to have an integer indexing system I think.
You could do it with the 3 points and just make the grenade a dummy and Every .04 seconds Instantly move Dummy and change Flying Height, That way could be done with only 1 dummy..... Sounds easier.
 
Level 7
Joined
Sep 24, 2008
Messages
281
Also another way to do it.
Because this is going to take so much time its going to have to have an integer indexing system I think.
You could do it with the 3 points and just make the grenade a dummy and Every .04 seconds Instantly move Dummy and change Flying Height, That way could be done with only 1 dummy..... Sounds easier.

yup, I know exactly how to remove the variables. but how can I create a unit with the offset of 1/3 of the origional bounce, with the origional angle?????

Now, I would greatly appreciate it if after I completed the spell, you could make it mui, so that it can function in my multiplayer map.

Anyway, here's the current version. My plan is to start out making it an ability, then transfer over to an item. However, I'm currently stumped due to mysterious crashes, do you see anything wrong?
 

Attachments

  • SWAT.w3x
    1.5 MB · Views: 66
Last edited:
Level 8
Joined
Apr 7, 2008
Messages
176
yup, I know exactly how to remove the variables. but how can I create a unit with the offset of 1/3 of the origional bounce, with the origional angle?????

Ok, umm. Im not real sure what your asking here...
If you're asking where to set the second bounce point to, then. it would be the Bounce_Distance you already have with a x2 at the end. Making it a 2/3 distance.

If you're asking how to create a unit, well then answer this post and we'll go over that. =D
 
Level 7
Joined
Sep 24, 2008
Messages
281
Ok, umm. Im not real sure what your asking here...
If you're asking where to set the second bounce point to, then. it would be the Bounce_Distance you already have with a x2 at the end. Making it a 2/3 distance.

If you're asking how to create a unit, well then answer this post and we'll go over that. =D

I think I got that working right (create 1 dummy unit (no locust) for nuetral passive, at Smoke_Point2, offset by bounce distance,degrees bounce angle.)

Anyway, check out the map.

And for clarification-
SmokeGrenade.jpg
 
Level 7
Joined
Sep 24, 2008
Messages
281
Update- new triggering, different spells, etc.

Today's problem.....Smoke_Unit1 with acid bomb Smoke_Unit2, and Smoke_Unit3, yet Smoke_Unit2 refuses to acid bomb Smoke_Unit3, essentially creating a launch and another launch, not a launch then a bounce.
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Grenade
  • Actions
    • Set Smoke_Point1 = (Position of (Triggering unit))
    • Set Smoke_Point2 = (Target point of ability being cast)
    • Set Bounce1_Distance = ((Distance between Smoke_Point1 and Smoke_Point2) / 3.00)
    • Set Throw_Angle = (Angle from Smoke_Point1 to Smoke_Point2)
    • Set Smoke_Point3 = (Smoke_Point2 offset by Bounce1_Distance towards Throw_Angle degrees)
    • Set Bounce2_Distance = ((Distance between Smoke_Point2 and Smoke_Point3) / 3.00)
    • Set Smoke_Point4 = (Smoke_Point3 offset by Bounce2_Distance towards Throw_Angle degrees)
    • Unit - Create 1 dummy unit for Neutral Passive at Smoke_Point1 facing Default building facing degrees
    • Set SmokeUnit1 = (Last created unit)
    • Unit - Add grenade projectile to SmokeUnit1
    • Unit - Add a 1.00 second Generic expiration timer to SmokeUnit1
    • Unit - Create 1 dummy unit (no locust) for Neutral Passive at Smoke_Point2 facing Default building facing degrees
    • Set SmokeUnit2 = (Last created unit)
    • Unit - Add grenade projectile to SmokeUnit2
    • Unit - Add a 1.00 second Generic expiration timer to SmokeUnit2
    • Unit - Order SmokeUnit1 to Neutral Alchemist - Acid Bomb SmokeUnit2
    • Unit - Create 1 dummy unit (no locust) for Neutral Passive at Smoke_Point3 facing Default building facing degrees
    • Set SmokeUnit3 = (Last created unit)
    • Unit - Add grenade projectile to SmokeUnit3
    • Unit - Add a 1.00 second Generic expiration timer to SmokeUnit3
    • Unit - Order SmokeUnit2 to Neutral Alchemist - Acid Bomb SmokeUnit3
    • Custom script: call RemoveLocation(udg_Smoke_Point1)
    • Custom script: call RemoveLocation(udg_Smoke_Point2)
    • Custom script: call RemoveLocation(udg_Smoke_Point3)
 

Attachments

  • SWAT.w3x
    1.5 MB · Views: 88
Level 8
Joined
Apr 7, 2008
Messages
176
Ummm.. well the way it is now, all that would happen at EXACTLY the Same Time. (Well not EXACTLY, but close enough you cant tell the difference.) Y did you remove teh action trigger?

Also, are you sure they dummies can cast their Grenade Projectile on each other?

Is your grenade gonna do damage at the end? Cus if it aint, you could just use Carrion Swarm for all the Grenade Spells.

And, Why do you create a dummy on the position of the caster? You could remove like half the trigger if you didnt do that. Making it run faster.

Edit*
Yea, i just drew it out. You should have made the dummies on P2, P3, and P4. Probably your problem.
 
Level 7
Joined
Sep 24, 2008
Messages
281
Ummm.. well the way it is now, all that would happen at EXACTLY the Same Time. (Well not EXACTLY, but close enough you cant tell the difference.) Y did you remove teh action trigger?

Also, are you sure they dummies can cast their Grenade Projectile on each other?

Is your grenade gonna do damage at the end? Cus if it aint, you could just use Carrion Swarm for all the Grenade Spells.

And, Why do you create a dummy on the position of the caster? You could remove like half the trigger if you didnt do that. Making it run faster.

Edit*
Yea, i just drew it out. You should have made the dummies on P2, P3, and P4. Probably your problem.
alright, attempting to make adjustments.
 
Level 7
Joined
Sep 24, 2008
Messages
281
alright, attempting to make adjustments.

Alright, I have taken I deep look at your version. One thing seems to bug me the most- the arc will only take effects on the final bounce. If that is fixed, then your version would be perfect.
UPDATE: ......this is begining to become quite tiresome. In any case, I'm scrapping the bouncing idea and going purely for a throw- deploy type item. Thanks anyway.
 
Last edited:
Level 8
Joined
Apr 7, 2008
Messages
176
You're talking about the last dummy's grenade spell? Yeah, its because it is from Rocket Barrage, instead of Carrion swarm like the rest. That way, it damages units in the explosion area instead of in a line, And if you use it for ALL the dummy's spells, the grenades wouldnt go straight. All you have to do is change the Projectile arc in the spell Art.
 
Level 7
Joined
Sep 24, 2008
Messages
281
You're talking about the last dummy's grenade spell? Yeah, its because it is from Rocket Barrage, instead of Carrion swarm like the rest. That way, it damages units in the explosion area instead of in a line, And if you use it for ALL the dummy's spells, the grenades wouldnt go straight. All you have to do is change the Projectile arc in the spell Art.

Alright, in the less complicated version, all I need to know is how to stun all of the units within the smoke area. What is the trigger for that?
 
Level 7
Joined
Sep 24, 2008
Messages
281
Thats the other reason I used the Tinker's ROcket Barrage for the last dummy's spell. It stuns units in the area for whatever duration you decide. There is no Trigger to directly stun a unit, You have to do it through dummies.

UPDATE:

EFFECTS (TRIGGER 1)

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Grenade
  • Actions
    • Set Smoke_Point1 = (Position of (Triggering unit))
    • Set Smoke_Point2 = (Target point of ability being cast)
    • Unit - Create 1 dummy unit for Neutral Passive at Smoke_Point1 facing Default building facing degrees
    • Set SmokeUnit1 = (Last created unit)
    • Unit - Add a 5.00 second Generic expiration timer to SmokeUnit1
    • Unit - Add Damage Grenade to SmokeUnit1
    • Unit - Order SmokeUnit1 to Neutral Tinker - Cluster Rockets Smoke_Point2
    • Wait ((Distance between Smoke_Point1 and Smoke_Point2) / 700.00) seconds
    • Set Smoke_Grenade_On = (Smoke_Grenade_On + 1.00)
    • Unit - Create 1 Smoke for Neutral Passive at Smoke_Point2 facing Default building facing degrees
    • Set Smoke_Effect = (Last created unit)
    • Animation - Play Smoke_Effect's Birth animation
CONFUSION (TRIGGER 2)

  • Events
    • Game - Smoke_Grenade_On becomes Equal to 1.00
  • Conditions
  • Actions
    • Wait 5.00 seconds
    • Animation - Play Smoke_Effect's Death animation
    • Set Smoke_Grenade_On = (Smoke_Grenade_On - 1.00)
 
Level 8
Joined
Apr 7, 2008
Messages
176
When you create the smoke unit add an expiration timer to it. Then it will kill itself.
Also, DO NOT use waits. The smallest wait u can have is .27 seconds, any wait smaller than that is treated as .27. I dont know what that equation you used comes out to, but it cant be smaller than that.
 
Level 7
Joined
Sep 24, 2008
Messages
281
When you create the smoke unit add an expiration timer to it. Then it will kill itself.
Also, DO NOT use waits. The smallest wait u can have is .27 seconds, any wait smaller than that is treated as .27. I dont know what that equation you used comes out to, but it cant be smaller than that.

The Waits work fine. Trust me, as it's even used in a tutorial posted here.
However, the stun issue is still not working. I tried copying and pasting the ability from your map, but it does not stun anyone.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Just a side-note: the shortest wait is 0.20, yet the 0.27 could be a possible result, since it works like this:

Wait-time = Random number(your time + 0.10)
So if you set 0.50 as your wait, it will be something between 0.50 and 0.60.

If you set it to 0.01 (or anything below 0.20), it will become 0.20-0.30, 0.27 is one of those results ^^
(it's not really a random number: the lower values are very rare, the most common are 0.25-0.29).

(these results were true over 90% of the times, sometimes it could go over the +0.10, this happened when the waits were very fast after eachother).

Yes, I have tested this myself, I've spent 10 minutes on checking and comparing the wait-results and 1 minute on writing the trigger to do it :p
 
Level 8
Joined
Apr 7, 2008
Messages
176
Ok, I just got back from watching Mindless Television. Blugh And have looked at your triggers again. You're confused about the second, right?
Well first off, even without those waits it isnt going to work right. :(
You have the smoke unit set to a variable BUT, once you cast the spell again that variable is set to a NEW unit. Thus when you're variable becomes 1 turning on the second trigger it kills the NEWEST unit, and leaves ALL others before it there. Just add a 5 second expiration timer to the guy.

You need to have that second trigger reset your variable to ZERO is what you're wanting to happen. What if you cast the spell 3 times in the next 5 seconds during that WAIT?? THat means your variable would be equal to 3, and then only be reduced to 2 at the end of that trigger. Thus it would NEVER fire again.
 
Status
Not open for further replies.
Top