HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Time of Day and Animation Questions

03-12-2008, 11:51 PM#1
Salbrismind
With regards to Time of Day:
1. When does it become night?
2. When does it become Day?
3. By default what is the speed of it in relation to the game or real life? (1 minute per real second?)
4. It asks for the time as a real, but does 5.5 means 5:30 or 5:50?

With regards to Animation:
1. Is it possible to make a unit's animation stop and start repeatedly?
2. If so how?


Thank you for helping me find the answers to these questions, just a few things that have been trouble for me.
03-12-2008, 11:58 PM#2
Rising_Dusk
1) 18:00
2) 06:00
3) I'm not sure the exact number, but you can SetGameSpeed() and toy with it to get a reasonable value.
4) The best solution would be to test it, since it's apparently been bothering you. However, if I recall in my past endeavors in the WE, I think it was quirky and 5.5 was 05:30.

You can stop a unit's animation by pausing it and calling SetUnitTimeScale(MyUnit, 0.00) [0% animation speed]. You can then toy with things and speed it up as necessary, a real value of 1.00 is 100% there. You can also pass negative values to reverse animations that have already started. You can also play whichever animations you want with SetUnitAnimation(...) or SetUnitAnimationByIndex(...) which takes the integer index of an animation, but allows specific choosing of animations even if their string name is uncertain. (Attack - 1 and Attack - 2 differentiation, for instance)
03-13-2008, 01:22 AM#3
Ammorth
Quote:
Originally Posted by Rising_Dusk
4) The best solution would be to test it, since it's apparently been bothering you. However, if I recall in my past endeavors in the WE, I think it was quirky and 5.5 was 05:30.

It would have to be otherwise the game wouldn't know what to do with 5.60 - 5.99
03-13-2008, 01:49 AM#4
Salbrismind
Quote:
Originally Posted by Rising_Dusk
1) 18:00
2) 06:00
3) I'm not sure the exact number, but you can SetGameSpeed() and toy with it to get a reasonable value.
4) The best solution would be to test it, since it's apparently been bothering you. However, if I recall in my past endeavors in the WE, I think it was quirky and 5.5 was 05:30.

You can stop a unit's animation by pausing it and calling SetUnitTimeScale(MyUnit, 0.00) [0% animation speed]. You can then toy with things and speed it up as necessary, a real value of 1.00 is 100% there. You can also pass negative values to reverse animations that have already started. You can also play whichever animations you want with SetUnitAnimation(...) or SetUnitAnimationByIndex(...) which takes the integer index of an animation, but allows specific choosing of animations even if their string name is uncertain. (Attack - 1 and Attack - 2 differentiation, for instance)

Thanks, alot most of these were just simple questions I didn't want to test until I had a few other triggers working which would have been a bit too much. Therefore you saved me some confusing bug testing, thank you.

For the animation I was thinking about this because I wanted to make an archer look like it is holding the arrow back until the player chooses to fire. I don't know how to model and the whole operation is interconnected so animations seems the best way. Could I make the unit hold the arrow and keep it there for a set time then make it release it? Also would it be possible to make it sort of seem to hold the bow with less strength? (Reverse the animation from near the end back a bit)

Thanks again.
03-13-2008, 02:20 AM#5
Rising_Dusk
Quote:
Could I make the unit hold the arrow and keep it there for a set time then make it release it?
Yes, but I recommend using timers to ensure you can set the ranger's animation speed to 0.00 the instant the arrow is pulled back. You might need a bit of trial and error to get the timing right, but it's totally possible and pretty easy to boot!
Quote:
Also would it be possible to make it sort of seem to hold the bow with less strength?
You can always attach special effects to make something seem stronger. You can only do as much as the current animations allow, but if you want to isolate a specific point of any animation, it's entirely possible to do so.
03-13-2008, 04:12 AM#6
Salbrismind
Quote:
Originally Posted by Rising_Dusk
Yes, but I recommend using timers to ensure you can set the ranger's animation speed to 0.00 the instant the arrow is pulled back. You might need a bit of trial and error to get the timing right, but it's totally possible and pretty easy to boot!

You can always attach special effects to make something seem stronger. You can only do as much as the current animations allow, but if you want to isolate a specific point of any animation, it's entirely possible to do so.

No worries i know how to use timers! Thanks though, if your interested that part of my map might be done by this weekend along with the terrain so look around for a map called "Mercenaries Battleground" in the next week or so!
03-13-2008, 05:26 AM#7
Alevice
The first 3 questions can be answered (and changed), through Gameplay Constants.