MetalShard, inc.
Pocket PC and Windows Games and Software

Pocket War (Game) Forum




This is a message in the Pocket War (Game) forum. If you would like to reply to this subject then fill in your reply in the box at the bottom of the page and click the Reply button. To get back to the main page for this forum click the Topics button.

Subject - Poweful new feature in 0.981
Pages: [1] Messages 1 - 1 of 1
Posted By: Tully (2003-05-12 20:06:48)

I slipped a 1.0 feature in the 0.981 patch release accidentally so I thought I would tell everyone before they start asking about it.

If you look on the waypoint detail screen there is a slot now for scripts on waypoints. You can now set scripts to run on waypoints. There is also a new callback unitArrived( Tile unit ) that gets called on scripts running on waypoints when a unit reaches the waypoint. The unitArrived method gets called before the waypoint sets the state of the unit that has touched it. So if you want to change what the unit is doing from the script change the actions on the waypoint not on the unit.

Using this you can do some pretty cool things like create sorting waypoints. The script could check the unit type arriving and then change where it sends units to by calling setMoveType to waypoint and setWaypointTarget to different waypoints.
Pages: [1] Messages 1 - 1 of 1




Reply


Attach File (zip and pwg files only)


you must be logged in to post
 
Copyright 2003-2010 MetalShard, inc. Games for Windows and Pocket PCs pocket war forums, automation software freegames