View Single Post
  #771    
Old May 13th, 2012, 06:56 PM
Haru~'s Avatar
Haru~
Can't resist the chubbiness :3
 
Join Date: Mar 2012
Gender: Female
Nature: Modest
Quote:
Originally Posted by LudicoloDude View Post
Spoiler:
#dynamic 0x800300
#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
applymovement 0x1 @move1
msgbox @1 0x5
compare 0x800d 0x1
if 0x1 goto @quake
msgbox @2 0x4
closeonkeypress
applymovement 0x1 @move2
release
end
#org @quake
lock
faceplayer
msgbox @3 0x4
closeonkeypress
setvar 0x8004 0xF
setvar 0x8005 0xF
setvar 0x8006 0xF
setvar 0x8007 0xF
special 0x136
setflag 0x200
release
end
#org @done
lock
faceplayer
msgbox @4 0x6
release
end
#org @move1
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE
#org @move2
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#org @1
= Do you want me to summon\nan earthquake?
#org @2
= Maybe next time.
#org @3
= HIYA!
#org @4
= I broke all of my bones to\ndo that.


I'm not sure what is wrong with this, but what I wanted it to do is when I press no, the sprite will go back to where it came from. what is wrong with this?
Changes in red. I recommend you script in this fashion so it looks less cluttered.
And use flags 0x1000 and up as the lower flags are used for other in-game functions and trainer flags. Using them may cause undesirable behaviour.
Spoiler:
Code:
'---------------
#dynamic 0x800300

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
applymovement 0x1 @move1
waitmovement 0x0
msgbox @1 0x5
compare 0x800D 0x1
if 0x1 goto @quake
msgbox @2 0x4
closeonkeypress
applymovement 0x1 @move2
waitmovement 0x0
release
end

#org @quake
//lock You don't need these two since you already
//faceplayer did a lock and faceplayer at the start.
msgbox @3 0x4
closeonkeypress
setvar 0x8004 0xF
setvar 0x8005 0xF
setvar 0x8006 0xF
setvar 0x8007 0xF
special 0x136
setflag 0x200
release
end

#org @done
//lock You don't need these two since you already
//faceplayer did a lock and faceplayer at the start.
msgbox @4 0x6
release
end

#org @move1
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move2
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0xFE

#org @1
= Do you want me to summon\nan earthquake?

#org @2
= Maybe next time.

#org @3
= HIYA!

#org @4
= I broke all of my bones to\ndo that.

Last edited by Haru~; May 13th, 2012 at 07:03 PM.
Reply With Quote