Created
January 19, 2014 21:13
-
-
Save Blecki/8511095 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| perform temporary_state state | |
| let actor.State = state | |
| wait 10 | |
| let actor.State = "idle" | |
| before follow_path | |
| let actor.State = "run" | |
| perform follow_path path | |
| foreach step in [path.QuantizePath 0.25] | |
| move actor step | |
| wait 1 | |
| after follow_path | |
| let actor.State = "idle" | |
| abort follow_path | |
| let actor.State = "slash" | |
| do startup #Run once when the scenario is loaded. | |
| resize_world 10 10 1 | |
| foreach x from 0 to 9 | |
| foreach y from 0 to 9 | |
| set_tile x y 0 "grass" | |
| do join #Actions are triggered by clients and run on the next turn | |
| spawn [world.AllocateActorID] client "player" [vector 0.5 0.5 0] #Spawn the player character | |
| command client "set_camera [vector 5 -1 5]; look_at [vector 5 2 0]" | |
| do walk target | |
| start_activity actor "follow_path" [find_path actor target] | |
| do knight_slash | |
| start_activity actor "temporary_state" "slash" | |
| do knight_magic | |
| start_activity actor "temporary_state" "magic" | |
| do knight_defeat | |
| start_activity actor "temporary_state" "defeat" | |
| do knight_victory | |
| start_activity actor "temporary_state" "victory" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment