Update - More triggers, autosave
Posted: Sat Jun 21, 2008 9:31 am
AI Command changes:
Previously a death trigger looked like this:
makeTrigger, death, someAction, SOURCE_PART#, TARGET_PART#, OR_OTHER_ACTION_RELATED_OPTIONS
However, I realised that I messed up the syntax. There's an order which makes much more sense.
Consider this:
You're using this command to rotate parts:
rotatePartToShip,5,7
and now you'd like to put it inside a trigger, which previously would look like this (assuming 6 is your source part #):
makeTrigger,death,rotatePartToShip,6,5,7
But it would make much more sense to go
makeTrigger,death,6
then copy and paste the command you were using above to get this:
makeTrigger,death,6,rotatePartToShip,5,7
Therefore, the new syntax is:
makeTrigger,death,sourcePart#,anyAICommand
I will keep backward compatibility with the old style though, as I don't want to ruin any levels that are using it. I must say though, that keeping things backward compatible is really annoying, as I now have 30 lines of code added to the 3 lines that are needed just so I won't break existing levels!
In case you were wondering, the actual code that I program had to change significantly to support this. But it's much cleaner and will make future additions easier.
And of course, there is an addition I've made which is what prompted this change. In fact I've been planning this feature ever since the idea of triggers came up, but my code just wasn't ready for it...until now.
Introducing, time triggers!
You can now specify a time for some action to happen and it will magically happen What kind of actions you say? It can be any AI command you were used to using before. Including more time triggers and death triggers. Even a death trigger can create a time trigger which then does your action, in fact, you can nest as many as you'd like together.
The syntax:
makeTrigger,time,frames,anyAICommand
Why frames? Because it's the simplest unit of time for me. The game theoretically runs at 30 frames per second. So just times the number of seconds you want by 30.
I expect you to get creative with how you want to use this.
Furthermore, there's now an autosave feature which will save your level on your local computer. In the event that you need to use it, just open up the editor (and go to the new menu if it's not already open) and click on "recover".
~MD
Previously a death trigger looked like this:
makeTrigger, death, someAction, SOURCE_PART#, TARGET_PART#, OR_OTHER_ACTION_RELATED_OPTIONS
However, I realised that I messed up the syntax. There's an order which makes much more sense.
Consider this:
You're using this command to rotate parts:
rotatePartToShip,5,7
and now you'd like to put it inside a trigger, which previously would look like this (assuming 6 is your source part #):
makeTrigger,death,rotatePartToShip,6,5,7
But it would make much more sense to go
makeTrigger,death,6
then copy and paste the command you were using above to get this:
makeTrigger,death,6,rotatePartToShip,5,7
Therefore, the new syntax is:
makeTrigger,death,sourcePart#,anyAICommand
I will keep backward compatibility with the old style though, as I don't want to ruin any levels that are using it. I must say though, that keeping things backward compatible is really annoying, as I now have 30 lines of code added to the 3 lines that are needed just so I won't break existing levels!
In case you were wondering, the actual code that I program had to change significantly to support this. But it's much cleaner and will make future additions easier.
And of course, there is an addition I've made which is what prompted this change. In fact I've been planning this feature ever since the idea of triggers came up, but my code just wasn't ready for it...until now.
Introducing, time triggers!
You can now specify a time for some action to happen and it will magically happen What kind of actions you say? It can be any AI command you were used to using before. Including more time triggers and death triggers. Even a death trigger can create a time trigger which then does your action, in fact, you can nest as many as you'd like together.
The syntax:
makeTrigger,time,frames,anyAICommand
Why frames? Because it's the simplest unit of time for me. The game theoretically runs at 30 frames per second. So just times the number of seconds you want by 30.
I expect you to get creative with how you want to use this.
Furthermore, there's now an autosave feature which will save your level on your local computer. In the event that you need to use it, just open up the editor (and go to the new menu if it's not already open) and click on "recover".
~MD