06.08.2006, 14:20:53
er my version also just parses one line each frame... =S
delays could be done with a "wait" command, next= would be the "jump to script" one.
your script would have to add hundreds of strings to the exe while mine doesn't need any (except for the tags)
this results in MUCH more speed, too, cause your scripts would need many string compares (err.. comparasations?) while mine doesn't need any.
just an example how my script would spawn 3 units next to each other:
[SW gets launched to a specific cell, that is the "target cell"]
1=262,MTNK //CreateUnit "MTNK" at targetcell
2=513,1,0 //move target cell x+1, targetcell is now the cell next to the old one
3=262,MTNK //create mtnk at the new target cell
all the parameters and commands would be loaded once and could be used without any string comparing but just numbers, which speeds the stuff up extremely.
as said, you don't have to know those numbers 513 or 262 by heart but a special tool will spit these out (similar to the AI script editors) and also be able to read them
one script line would be executed per frame
if you need delays, there'll be a Wait command, which waits for a specific amount of frames.
I don't think there's a much better (concerning performance) system for this.
the scripts don't have to be tied to SWs only but could be used globablly (e.g. for "events")
delays could be done with a "wait" command, next= would be the "jump to script" one.
your script would have to add hundreds of strings to the exe while mine doesn't need any (except for the tags)
this results in MUCH more speed, too, cause your scripts would need many string compares (err.. comparasations?) while mine doesn't need any.
just an example how my script would spawn 3 units next to each other:
[SW gets launched to a specific cell, that is the "target cell"]
1=262,MTNK //CreateUnit "MTNK" at targetcell
2=513,1,0 //move target cell x+1, targetcell is now the cell next to the old one
3=262,MTNK //create mtnk at the new target cell
all the parameters and commands would be loaded once and could be used without any string comparing but just numbers, which speeds the stuff up extremely.
as said, you don't have to know those numbers 513 or 262 by heart but a special tool will spit these out (similar to the AI script editors) and also be able to read them
one script line would be executed per frame
if you need delays, there'll be a Wait command, which waits for a specific amount of frames.
I don't think there's a much better (concerning performance) system for this.
the scripts don't have to be tied to SWs only but could be used globablly (e.g. for "events")