I would like to set the duration of a behavior through triggers in REALS, which time is measured. Unfortunately "Set Unit Behavior Duration" only accepts Integers. Wait, what... REALLY!??!?!
Who is the idiot who decided to only allow you to set behavior durations in integers? Why are you employed because I'm taking your job.
are you trolling? because i can set my behaviour - buff's value Stats-Duration value to decimals aswell as integers. are you sure you are map making correctly?
ok sorry for being a bitch in my post but this all came because you posted this in the data section of the forum and not the trigger section. so i take back what i said. and looking at what you were talking about it does seem to only allow integers(clamp-integer,etc) soo you might need custom script, or galaxy scripting of some sort, or just make a behaviour for each stat duration you want. and then switch between them eg: stop this behaviour, add this behaviour blah blah
True enough, but behaviors are both data and triggers. I'm trying to set the duration of a behavior after the unit has the behavior, maybe there is a data solution...
You can modify the duration by setting catalog values, which would be strings, so you can easily use reals here. However, this modifies the duration for all behaviors of the same type for one player, not for a single unit.
There is quite clearly a solution and it was already provided:
Set the duration in the Data Editor.
OR
Set the variables to Strings in the Triggers Editor.
If you're going to ignore that part and keep asking for a trigger solution, then take this to the triggers section or I'm going to troll you. Just FYI :)
You can modify the duration by setting catalog values, which would be strings, so you can easily use reals here. However, this modifies the duration for all behaviors of the same type for one player, not for a single unit.
Using this method will I need multiple behaviors for multiple players or can I use 1 behavior and modify it for 10 different players? Because the behavior only affects 1 unit per player Catalog values might be the way to go.
Using this method will I need multiple behaviors for multiple players or can I use 1 behavior and modify it for 10 different players? Because the behavior only affects 1 unit per player Catalog values might be the way to go.
As you can see, catalog functions use a player parameter, so they change the duration per player.
Quote:
And how would I set the duration of a behavior .. lets name it "GenericTimer"
Catalog Field Value Set Catalog: Behaviors Entry: "GenericTimer" Field Path: "Duration" Player: playerNumber Value: "4.0"
Does that look right?
Yes, seems to work. Thanks a billion, but doesn't it seem backwards that I had to set the catalog field value to a string because Set Unit Behavior Duration doesn't allow reals? At least you can see how asinine the "Set Unit Behavior Duration" trigger is in my original post, right?
Yes, seems to work. Thanks a billion, but doesn't it seem backwards that I had to set the catalog field value to a string because Set Unit Behavior Duration doesn't allow reals? At least you can see how asinine the "Set Unit Behavior Duration" trigger is in my original post, right?
I didn't even know a Set Unit Behavior Duration function exists ;)
Also it seems to be a Gui-only bug, and I am a Galaxy script user:
sorry i did of course mean the other way round, i think you can do both weirdly enough
i had to do a ridiculous trigger for creating a dialog at the mouse X/Y co-ords:
Dialog - Move dialog_test to ((Integer(((Real((Mouse X position in the UI))) * 1.5))), (Integer(((Real((Mouse Y position in the UI))) * 1.5)))) relative to Top Left of screen
It seemed to do the trick and as you can see it kinda goes both ways, you could try seeing what happens and seeing if it strips the decimal or not, like Kueken531 said the field should accept a real value so you never know! you can't really ever rely on this editor being logical :P
I would like to set the duration of a behavior through triggers in REALS, which time is measured. Unfortunately "Set Unit Behavior Duration" only accepts Integers. Wait, what... REALLY!??!?!
Who is the idiot who decided to only allow you to set behavior durations in integers? Why are you employed because I'm taking your job.
are you trolling? because i can set my behaviour - buff's value Stats-Duration value to decimals aswell as integers. are you sure you are map making correctly?
@zeropoints: Go
Not through triggers you can't.
Well that's your problem right there. Triggers are sooooooo WC3.
@Rhadamant5186: Go
Why do you need a duration to be that precise?
@REDlandry: Go
And how am I supposed to use variables that affect behavior duration without triggers?
@silvermage: Go
Why does it matter to you? I need it up to a tenth of a second, not asking much, it isn't like I'm calculating it in nanoseconds.
ok sorry for being a bitch in my post but this all came because you posted this in the data section of the forum and not the trigger section. so i take back what i said. and looking at what you were talking about it does seem to only allow integers(clamp-integer,etc) soo you might need custom script, or galaxy scripting of some sort, or just make a behaviour for each stat duration you want. and then switch between them eg: stop this behaviour, add this behaviour blah blah
@zeropoints: Go
True enough, but behaviors are both data and triggers. I'm trying to set the duration of a behavior after the unit has the behavior, maybe there is a data solution...
You can modify the duration by setting catalog values, which would be strings, so you can easily use reals here. However, this modifies the duration for all behaviors of the same type for one player, not for a single unit.
There is quite clearly a solution and it was already provided:
Set the duration in the Data Editor.
OR
Set the variables to Strings in the Triggers Editor.
If you're going to ignore that part and keep asking for a trigger solution, then take this to the triggers section or I'm going to troll you. Just FYI :)
Using this method will I need multiple behaviors for multiple players or can I use 1 behavior and modify it for 10 different players? Because the behavior only affects 1 unit per player Catalog values might be the way to go.
The duration of the behavior needs to vary based upon variables so this isn't a viable solution, but thank you for the help.
As you can see, catalog functions use a player parameter, so they change the duration per player.
Yes, you could just try it out?
@Kueken531: Go
Yes, seems to work. Thanks a billion, but doesn't it seem backwards that I had to set the catalog field value to a string because Set Unit Behavior Duration doesn't allow reals? At least you can see how asinine the "Set Unit Behavior Duration" trigger is in my original post, right?
in the trigger can you just use the convert function for the integer, and convert integer to real?
i would test but i'm at work and don't have access to the editor
I didn't even know a Set Unit Behavior Duration function exists ;)
Also it seems to be a Gui-only bug, and I am a Galaxy script user:
As you can see, the galaxy function takes a fixed duration, which equals real in Gui. If the Gui function only takes integer, this is probably a bug.
So, you can also solve your issues by using plain galaxy script or by adding a line of custom script.
@xil_theMINISTER: Go
I need to convert a real to an integer, but thanks for the suggestion.
@Kueken531: Go
I may end up doing that rather than changing catalog values. For now the catalog values work fine though.
*facepalm* this is totally triggers. . .
sorry i did of course mean the other way round, i think you can do both weirdly enough
i had to do a ridiculous trigger for creating a dialog at the mouse X/Y co-ords:
Dialog - Move dialog_test to ((Integer(((Real((Mouse X position in the UI))) * 1.5))), (Integer(((Real((Mouse Y position in the UI))) * 1.5)))) relative to Top Left of screen
It seemed to do the trick and as you can see it kinda goes both ways, you could try seeing what happens and seeing if it strips the decimal or not, like Kueken531 said the field should accept a real value so you never know! you can't really ever rely on this editor being logical :P
Custom script works perfectly fine except that it produces an error message. What a bother!
Doesn't it accept catalog value changes?
Oh it's a necro.