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

How can you change unit to flying via triggers?

Status
Not open for further replies.
Level 1
Joined
Jul 21, 2011
Messages
7
I would like to know how to change a unit to flying without changeing the unit, like just change the unit from ground type to flying type.

I don't want it to change unit because the unit is moving at the time it happens and it makes it look wrong... like the unit lags or something...

Thanks guys
 
I think that, contrary to what Dr Super Good said, you might be able to make it a flying unit. You'd either have to use a morph ability to change it into a flying version of your unit, or you would have to find away to change what it can collide with. o_O

To get over the thing with the unit looking wrong, you'd just have to make it play the right animation when it does whatever it is you want it to do. Are you trying to make a jump ability or maybe just send a unit flying into the air after an explosion? You need to be moar detailed about what you're trying to accomplish.

I need the unit to pretty much walk towards a cliff ledge, then turn into flying unit so it can move past the cliff edge and fall the to the ground.
Reaper ability?
 
Level 1
Joined
Jul 21, 2011
Messages
7
I think that, contrary to what Dr Super Good said, you might be able to make it a flying unit. You'd either have to use a morph ability to change it into a flying version of your unit, or you would have to find away to change what it can collide with. o_O

To get over the thing with the unit looking wrong, you'd just have to make it play the right animation when it does whatever it is you want it to do. Are you trying to make a jump ability or maybe just send a unit flying into the air after an explosion? You need to be moar detailed about what you're trying to accomplish.


Reaper ability?

Need it so units can fall off a cliff, and have it looking smooth and natural... The problem with replacing a unit with a flying one... for that split second while it changes it looks jerky.
 
Need it so units can fall off a cliff, and have it looking smooth and natural... The problem with replacing a unit with a flying one... for that split second while it changes it looks jerky.

Why not make all your units flying ones and create a gravity system? That would fix your problem, although it might create a new one in regards to pathing (where ground units walk off of cliffs instead of going around them). It seems you want that though.
 
Level 1
Joined
Jul 21, 2011
Messages
7
Why not make all your units flying ones and create a gravity system? That would fix your problem, although it might create a new one in regards to pathing (where ground units walk off of cliffs instead of going around them). It seems you want that though.

What would be the best way of creating a gravity system?

Ok I am sorry I made a horrible mistake LOL, this is what happens when I open too many windows on a WC3 site.

Try using a morph ability with the right flags. You could possibly get it to run passivly (does not interupt orders).

Any ideas of how to do this one?
 
Level 1
Joined
Jul 21, 2011
Messages
7
I could still use some help, and is there any way to set a variable up with multiple initial values when using indexing?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
No a variable can not have multiple initial values as computers use binary logic to work. As such storing 2 ore more states in the same memory location is impossible and illogical. When we switch to quantum computers in possibly 20 years then it might be viable but until then you will just have to do with 1 value per storage location.

If the scripting lanugage supports array constants, you could then initialize an array so each index has a unique value.

I think it was like this...
int test[2] = {1337,28};
But I am afraid I have not used C in a while so the syntax may not be right.
 
Level 1
Joined
Jul 21, 2011
Messages
7
No a variable can not have multiple initial values as computers use binary logic to work. As such storing 2 ore more states in the same memory location is impossible and illogical. When we switch to quantum computers in possibly 20 years then it might be viable but until then you will just have to do with 1 value per storage location.

If the scripting lanugage supports array constants, you could then initialize an array so each index has a unique value.

I think it was like this...
int test[2] = {1337,28};
But I am afraid I have not used C in a while so the syntax may not be right.

Do you know if its possible to fill up a Data table before loading the map? Like how you set an initial value on variables... initial Data table values?
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
No, it is impossible to run any trigger code before a map loads.
You can however fill in entires in the table as the map is loading by running the appropiate calls in an initialization routeine.

Try avoiding data tables when possible as they will be slower than variables.
 
Level 1
Joined
Jul 21, 2011
Messages
7
No, it is impossible to run any trigger code before a map loads.
You can however fill in entires in the table as the map is loading by running the appropiate calls in an initialization routeine.

Try avoiding data tables when possible as they will be slower than variables.

Fair enough I will avoid the data tables for now...

Also do you know if its possible to allow air and ground units to use those energy/health recovery things? The ones from the campaign that heal your units when you go near them, little blue/red floating cubes.

I try collecting them with air units and it doesnt let me... only lets me use them if its a ground unit, any ideas?

Events
Unit - Any Unit uses Raynor - Toss Grenade at Generic1 - Any stage (Ignore shared abilities)
Local Variables
Conditions
Actions
UI - Display "Tosses a grenade" for (All players) to Subtitle area

For some reason it displays the message 7 times when I cast the ability, why on earth is it doing that? It's acting as if I'm casting the ability 7 times when infact I'm only casting it once...
 
Last edited by a moderator:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,188
Also do you know if its possible to allow air and ground units to use those energy/health recovery things? The ones from the campaign that heal your units when you go near them, little blue/red floating cubes.
You will probably have to alter the targets that it finds acceptable to be picked up by. This is eithor in an effect or a validator.

For some reason it displays the message 7 times when I cast the ability, why on earth is it doing that? It's acting as if I'm casting the ability 7 times when infact I'm only casting it once...
Its doing exactly what you tell it to. You want the message displayed at all 7 stages of an ability cast so it displays it at each of the 7 ability cast stages. Try choosing a single stage which is appropiate to when you want the trigger to fire.
 
Level 1
Joined
Jul 21, 2011
Messages
7
You will probably have to alter the targets that it finds acceptable to be picked up by. This is eithor in an effect or a validator.


Its doing exactly what you tell it to. You want the message displayed at all 7 stages of an ability cast so it displays it at each of the 7 ability cast stages. Try choosing a single stage which is appropiate to when you want the trigger to fire.

That worked for both...

Do you know how I can create the grenade effect at a higher height? The one for Raynor - Toss Grenade...

I cant find how on earth to make that set to a higher height.

I need to get it so when the ability casts and my units are currently on the bridge the animation doesnt just go through the bridge and end up on the ground below...

Need to make it look like the explosion happens on the bridge, and I will just set the targets to air(the unit types on the bridge)
 
Status
Not open for further replies.
Top