It would be good if you provide me a map to see what you did. Because I have no idea of triggers. I already tried around with them a bit and understood a trigger based ability (unit casts ability and gets set back in time 5 seconds, restoring HP/energy/position) but I really can't do it myself - the interface is kinda... bad for a beginner.
I successfully made a test map changing lighting with triggers when an ability is used.
I assume you know triggers enough to be able to mess around with it and get it to work the way you want it to.
Edit: I may have been confused as to what you wanted. Did you want it to change the lighting for x amount of time or do you want it to change the time of day?
Okay, this was very easy. My ability starts with my unit casting it and ends with a behavior being removed from it. The ability and the behavior are always tied together and the behavior only exists on the casting unit - so this trigger is very easy (even for me).
And since there can never be two units of this type (and thus never two units with this ability) I can just leave "Any Unit" in the trigger.
Is there a way to change the lighting to what it was before it got changed, without knowing what that was? Because this is a mod for map - and I'm not in possession of the map (otherwise I can probably still ask what lighting it uses).
A) I don't know if triggers transfer or not through a mod
B) As far as I know, you can't get the current lighting data, meaning you can't figure out what the lighting is before you change it
C) The only way I know how it would be able to work using this method is if you set the lighting at map initialization and set it to that lighting whenever you use an ability
Mhm, well, guess I have to ask then - not like it's a big deal, just a little inconvenience.
Further, if I want to narrow "any unit" down to a unit type, how do I do that? Probably with a variable "Unit Type" - I just have no idea how to get that variable into the trigger >_> /beginnerscrubishness
But no, this is for a different trigger on a different map. I run a function for a unit - I have as event map initialisation and as action a function. That function is run for a certain unit on the map (preplaced) and I want that function to start running for this type of unit when it is created, not for a preplaced unit.
We have the same advantage here, the unit is unique, but it won't exist from the start, it will be created (like by a selection screen). And I want that trigger to work with the unit when it is created and not preplaced.
Well the function runs for a parameter unit and that parameter unit has to be set - so how can I make this field "parameter unit" target the unit that has been created?
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Is there a way to do this with data? Or only with triggers?
What I want to do is to change the lighting of the map during an ability. So it has to be changed forth and back.
However this is possible, please explain it to me (if it's only with triggers, please pretty detailed).
I know it's possible with triggers. It might be possible with data, but I haven't dug into that much.
I'll mess around with triggers and report back in a bit...
It would be good if you provide me a map to see what you did. Because I have no idea of triggers. I already tried around with them a bit and understood a trigger based ability (unit casts ability and gets set back in time 5 seconds, restoring HP/energy/position) but I really can't do it myself - the interface is kinda... bad for a beginner.
I successfully made a test map changing lighting with triggers when an ability is used.
I assume you know triggers enough to be able to mess around with it and get it to work the way you want it to.
Edit: I may have been confused as to what you wanted. Did you want it to change the lighting for x amount of time or do you want it to change the time of day?
Just the lighting. And I have no ideas about triggers. I assume this is pretty easy, but I have nothing to start with >_>
K, here's the map...
Okay, this was very easy. My ability starts with my unit casting it and ends with a behavior being removed from it. The ability and the behavior are always tied together and the behavior only exists on the casting unit - so this trigger is very easy (even for me).
And since there can never be two units of this type (and thus never two units with this ability) I can just leave "Any Unit" in the trigger.
Is there a way to change the lighting to what it was before it got changed, without knowing what that was? Because this is a mod for map - and I'm not in possession of the map (otherwise I can probably still ask what lighting it uses).
A) I don't know if triggers transfer or not through a mod
B) As far as I know, you can't get the current lighting data, meaning you can't figure out what the lighting is before you change it
C) The only way I know how it would be able to work using this method is if you set the lighting at map initialization and set it to that lighting whenever you use an ability
D) This may require data or work arounds...
Mhm, well, guess I have to ask then - not like it's a big deal, just a little inconvenience.
Further, if I want to narrow "any unit" down to a unit type, how do I do that? Probably with a variable "Unit Type" - I just have no idea how to get that variable into the trigger >_> /beginnerscrubishness
If you are referring to "any unit" in the event, that shouldn't be changed, but you can filter it using a condition.
If you add a condition to that trigger, perform these two steps...
1): double click "owner of unit" and change it to "unit type of unit"
2): double click "no value" and pick a unit type
That's about it, pretty simple.
Haha, guess what I just figured out on my own.
But no, this is for a different trigger on a different map. I run a function for a unit - I have as event map initialisation and as action a function. That function is run for a certain unit on the map (preplaced) and I want that function to start running for this type of unit when it is created, not for a preplaced unit.
We have the same advantage here, the unit is unique, but it won't exist from the start, it will be created (like by a selection screen). And I want that trigger to work with the unit when it is created and not preplaced.
I would still use the same condition I mentioned earlier.
Well the function runs for a parameter unit and that parameter unit has to be set - so how can I make this field "parameter unit" target the unit that has been created?