Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Fri Apr 19, 2024 5:44 am
All times are UTC + 0
SW script
Moderators: Judeau
Post new topic   Reply to topic Page 1 of 1 [1 Post] Mark the topic unread ::  View previous topic :: View next topic
Author Message
DragonFly
Cyborg Soldier


Joined: 02 Jun 2007
Location: England

PostPosted: Fri Jun 22, 2007 8:07 pm    Post subject:  SW script
Subject description: super weapon scripting suggestion
Reply with quote  Mark this post and the followings unread

I suggest a method of scripting super weapons rather than the curret hard coded method.

All varibles should be local within the script only to prevent conflicts if 2 scripts use the same varible name or 2 instances of a script run at once.
Certain varibles should be set when the SW is fired such as:
Code:

FiredBy        ;The strcture that fired this sw such as a nuke silo.
Target         ;Where the player targeted the sw.
Owner          ;The player number who fired the sw


2 examples of it's use. 1st is for a para drop and the second for the multi missile.
1st word of each line should define a command
as Spawn, Deploy, Move
after this should be the commands parameters seperated by commas


Code:


[PARADROPSW]
SpawnOffMap, HPLANE, DropPlane, Owner ;Spawn Heavy Plane Unit off map. Assign unit name "DropPlane" owned by "Owner"
CriticleObject, DropPlane ;This makes "DropPlane" a script criticle object. If the object is destroyed script will end thus preventing a possible wait for eternity later in the script.
Move, DropPlane, Target ;Move unit "DropPlane" to "Target"

Distance, DropPlane, Target, >, 10 ;Don't proced unit DropPlane is less than 10 cells from Target.
Para, DropPlane, E1, 10, NULL, Owner ;Drop 10 units of type E1 from unit "DropPlane" and don't give these units a name. Units owned by "Owner"
ExitMap, DropPlane ;Order "DropPlane" to move off map and disapear.
End ;End the script

Code:

[MULTISW]
FireWeapon, MultiMissile, FiredBy, Target, Owner  ;Fire the multimissile weapon from the fired by object (silo) at the target location. Missile Owned by "Owner"
End

If needed the commands etc could be replace with numbers as in TS's AI scripts but i think retaining words would be best if possible for readabilerty.

While this might seem alot of work for SW's the scripting system could also be used for writeing AI scripts.

Back to top
View user's profile Send private message Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 3.0813s ][ Queries: 11 (2.9301s) ][ Debug on ]