Fandom

Project Spark Wiki

RTS basic set-up

233pages on
this wiki
Add New Page
Comments0 Share

Logic Camera Cube First the start page, to call the the pages.

http://i.imgur.com/IepqXCD.png

Then make the relevant variables: http://i.imgur.com/X8isz2K.png

Then the main part for controlling the camera movement is to adjust the pitch and yaw with the RMB when moved on the X or Y axis. http://i.imgur.com/uxvEUkt.jpg?1

Then we want click on or draw a selectionbox and highlight the NPC's within the selection drawbox: http://i.imgur.com/6AEbbVL.jpg

And the kode for controlling a NPC. When a NPC is selected they get the variable Move=active and Target=RMBTarget (the Right Mouse Button position in the world).  http://i.imgur.com/5G6ZIFk.jpg

NPC's

All NPC's(recommend to use as a template) are waiting to receive the move=active and the RMB target position. The NPC will then move to the received position. I like to see where the are going so also displays the destination object and a red line draw to the target. http://i.imgur.com/21MDsYI.jpg

You can then program when Bump, or in Zone detection, etc. to DO an action.

Update:  When the mouse touches the edge of the screen then display a object: Screenside equals to 0.96  http://i.imgur.com/0CDrL4L.png

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.