Enhanced material animation for PyPRP
Posted: Mon Aug 05, 2013 7:37 am
It always bugged me that it's not possible to fully control material layer animation, so I added some parameters that were not fully implemented yet.
We were already able to use these commands:
These were possible because there's no parameter passed, they just "execute".
This did not give much control over the animation though, because we can basically only start or stop an animation.
But the following commands need parameters, which was not implemented; instead, mostly a value of just 0 was internally assigned, which totally broke the animation in some cases:
- setspeed
- setbegin
- setend
- setloopbegin
- setloopend
- gototime
- playtotime
Now it's possible to use these commands as well.
Here's an AlcScript example of the syntax; we set double speed of the material animation in this example:
This way, you can play material animations at different speeds from now on, or define different speeds for for(e)wards and backwards animations.
Or you can hold different sections of the animation in the IPO curve, and play only part of it when needed, by using setbegin or setend for example.
Below you'll find a replacement file to be put in your PyPRP directory which does the job.
It's compatible to the current version 1.61 and it does not break your age.
Here's the list of value names (like "speed: 2.0" in the above example) belonging to the new commands:
speed
time
begin
end
loopbegin
loopend
speedchangerate
(The commands gotopercent and playtopercentage are still unuseable; I haven't found out where to put belonging values in the PRP.)
~Tach
We were already able to use these commands:
These were possible because there's no parameter passed, they just "execute".
This did not give much control over the animation though, because we can basically only start or stop an animation.
But the following commands need parameters, which was not implemented; instead, mostly a value of just 0 was internally assigned, which totally broke the animation in some cases:
- setspeed
- setbegin
- setend
- setloopbegin
- setloopend
- gototime
- playtotime
Now it's possible to use these commands as well.
Here's an AlcScript example of the syntax; we set double speed of the material animation in this example:
- Code: Select all
logic:
actions:
- type: responder
tag: MatForward # Responder Name or Tag
responder:
states:
- cmds:
- type: animcmdmsg
params:
receivers:
- 0043:MaterialName-TextureName
cmds:
- setforewards
- setspeed # SetSpeed Command
- continue
speed: 2.0 # SetSpeed Value
waiton: -1
nextstate: 0
waittocmd: 0
curstate: 0
flags:
- detecttrigger
This way, you can play material animations at different speeds from now on, or define different speeds for for(e)wards and backwards animations.
Or you can hold different sections of the animation in the IPO curve, and play only part of it when needed, by using setbegin or setend for example.
Below you'll find a replacement file to be put in your PyPRP directory which does the job.
It's compatible to the current version 1.61 and it does not break your age.
Here's the list of value names (like "speed: 2.0" in the above example) belonging to the new commands:
speed
time
begin
end
loopbegin
loopend
speedchangerate
(The commands gotopercent and playtopercentage are still unuseable; I haven't found out where to put belonging values in the PRP.)
- A more complex example: Show Spoiler
~Tach