Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #ScriptVersion[3]
- #Title["Tester"]
- #Text["Example"]
- let ObjEnemy;
- let ObjPlayer;
- Task MotionTask() //moves the boss every 250 frames
- {
- loop
- {
- let x_random= rand_int(0, 100);
- let y_random= rand_int(0, 100);
- MoveBoss(x,y); //dummy task, define this yourself
- loop(250) {yield;}
- }
- }
- task BulletTask() //does a random bullet pattern every 300 frames
- {
- loop
- {
- let pattern_id= rand_int(1, 3);
- DoBulletPattern(pattern_id); //dummy task
- loop(300) {yield;}
- }
- }
- function Do_Routines()
- {
- MotionTask();
- BulletTask();
- }
- @Event
- {
- alternative(GetEventType())
- {
- case(EV_REQUEST_LIVE)
- {
- SetScriptResult(100);
- }
- }
- }
- @Initialize
- {
- Do_Routines();
- }
- @MainLoop
- {
- yield; //so our tasks have a turn each frame
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement