Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub > Beginner’s Lounge
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

Beginner’s Lounge Where all good (and bad) ideas start. This is the Beginner’s Lounge, where if you need a helping hand or want to develop your small ideas, you bring it here. We won't bite.



Closed Thread
 
Thread Tools
  #6876    
Old May 19th, 2012 (11:07 PM).
droomph's Avatar
droomph droomph is offline
mmm gurl that 90s
Crystal Tier
 
Join Date: Sep 2011
Location: bar'jách
Age: 18
Gender: Male
Nature: Impish
Posts: 4,289
Quote originally posted by ChikoritaMudkipz:
thanks, I know how to do that though.
Basically I need a template of a pokemon centre healing script.
Find a PC on AMap, select the Nurse's sprite, and record what offset her script is and work from there.
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt


  #6877    
Old May 19th, 2012 (11:13 PM).
ChikoritaMudkipz's Avatar
ChikoritaMudkipz ChikoritaMudkipz is offline
 
Join Date: Jun 2009
Gender: Male
Posts: 30
Quote originally posted by droomph:
Find a PC on AMap, select the Nurse's sprite, and record what offset her script is and work from there.
Alright this isn't getting anywhere.
I heard about this whole poke center thing where they're tied to fly blocks and something, and this engine I put in changed the way the whole thing works.

I need a template for the engine hack.
__________________
youtube channel: http://www.youtube.com/user/ChikoritaMudkipz
check out my shiny gold x run!
  #6878    
Old May 20th, 2012 (08:52 AM).
Kaith's Avatar
Kaith Kaith is offline
Hacker of Fire
 
Join Date: Oct 2011
Location: North, it's cold.
Gender: Male
Nature: Relaxed
Posts: 49
Quote originally posted by ChikoritaMudkipz:
Alright this isn't getting anywhere.
I heard about this whole poke center thing where they're tied to fly blocks and something, and this engine I put in changed the way the whole thing works.

I need a template for the engine hack.
I'm pretty sure you and I are in the same boat here. I applied a patch to fire red that did the exact same thing. I'm working on rewriting the Nurse Joy script right now and so far it works perfect until I get to the line that says: I've restored your Pokemon to full health. Then the screen goes haywire for awhile.

I pulled this script from a clean Fire Red and repointed everything, and I can't seem to figure out where I went wrong. (If it's a tiny error please forgive me scripting gods! I am still a newbie when it comes to scripting!)

Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
call @A
release
end

#org @A
special 0x187
compare LASTRESULT 0x2
if 0x1 goto @C
preparemsg @D
waitmsg
multichoice 0x13 0x8 0x0 0x2
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto @E
compare 0x8000 0x1
if 0x1 goto @F
compare 0x8000 0x7F
if 0x1 goto @F
end

#org @C
release
end

#org @E
cmdc3 0xF
preparemsg @B
waitmsg
call @H
special 0x169
goto @I

#org @F
msgbox @J 0x6
return

#org @H
applymovement LASTTALKED @move1
waitmovement 0x0
doanimation 0x19
checkanimation 0x19
applymovement LASTTALKED @move2
waitmovement 0x0
special 0x0
return

#org @I
special2 LASTRESULT 0x1B1
compare LASTRESULT 0x0
if 0x1 goto @K
special2 LASTRESULT 0x183
copyvar 0x8008 LASTRESULT
compare 0x8008 0x0
if 0x1 goto @K
compare 0x8008 0x1
if 0x1 goto @L
end

#org @K
preparemsg @M
waitmsg
applymovement LASTTALKED @move3
waitmovement 0x0
msgbox @J 0x4
return

#org @L
checkflag 0x842
if 0x1 goto @K
msgbox @M 0x4
setflag 0x842
preparemsg @N
waitmsg
applymovement LASTTALKED @move3
waitmovement 0x0
msgbox @J 0x4
return

#org @D
= Welcome to the Pokémon Center!\pWould you like me to heal your\nPokémon back to perfect health?

#org @B
= Okay, I'll take your Pokémon for a\nfew seconds.

#org @J
= We hope to see you again!

#org @M
= Thank you for waiting.\nI've restored your Pokémon to\lfull health.

#org @N
= It appears as if [buffer1] is playing\nright now.\lGo for it!

#org @move1
#raw 0x2F
#raw 0xFE

#org @move2
#raw 0x2D
#raw 0xFE

#org @move3
#raw 0x5B
#raw 0x1A
#raw 0xFE
__________________
Hackers, Hacker everywhere.

Hacks I support:
FloralSky





  #6879    
Old May 23rd, 2012 (10:56 AM).
Jean LaFlame's Avatar
Jean LaFlame Jean LaFlame is offline
French chic ♪
 
Join Date: Jun 2011
Gender: Male
Posts: 6
Well, I'm not sure this goes here...
I'd want to know what the spritebehave command is. What does it exactly do?
Thank you in advance.
  #6880    
Old May 23rd, 2012 (07:29 PM). Edited May 23rd, 2012 by Hadesminion13.
Hadesminion13 Hadesminion13 is offline
 
Join Date: Apr 2009
Gender:
Posts: 29
Ugh I hate to ask two questions in one day, but I'm not very good at applymovements and this has me stumped

Script:
Spoiler:

#dynamic 0xE00000

#org @start
lock
faceplayer
checkflag 0x904
if 0x1 goto @end
checkflag 0x903
if 0x1 goto @cont
msgbox @fail 0x6
release
end

#org @cont
msgbox @win 0x2
applymovement 0xF @movements
hidesprite 0xF
setflag 0x904
release
end

#org @movements
#raw 0x07 0x07 0x07 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0xFE

#org @end
release
end

#org @fail
= Sorry dude, boss says\nnobody's allowed in!

#org @win
= Hey man, my boss told me\nto let you in!\pGuess it's your lucky day,\nand that means my job's done!


Now, I have another sprite somewhere else that sets the flag so flags are not an issue, my problem is that after the NPC moves off the screen my character is still locked. Other guys are still animated and stuff, the game hasn't frozen, but none of my buttons do anything. I know that it's a problem with waitmovement 0x0, because when I remove that line he disappears right away, which is the line below waitmovement, and then I can move.

AFAIK the script is correct, no compilation errors, and he actually moves, my character's just locked.

EDIT:
Alright, after a VERY long time of just sitting there, a menu appears on the top left of my screen with the options BUY and QUIT. My controls are still locked and the game appears to be frozen, but not crashing.
__________________

Feed Me!

Adopted from Valenth
  #6881    
Old May 23rd, 2012 (07:37 PM). Edited May 23rd, 2012 by vanillagfx.
vanillagfx's Avatar
vanillagfx vanillagfx is offline
 
Join Date: May 2012
Gender: Male
Posts: 90
When you click yes it unlocks and it doesn't tell you the rest unless you talk to it again.
Spoiler:
#dynamic 0x80004B

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
msgbox @sign 0x5
setflag 0x200
release
end

#org @sign
= It's an email from Kira, would\nyou like to check it?

#org @done
msgbox @yes 0x6
clearflag 0x200
release
end

#org @yes
= Hi \v\h01, this is Kira.\nI went outside today to train and\lm
y
pokemon vanished! What could\lcause this?! Meet me at the\lhideout behind the gym in Wolkey\lTown, be careful #dynamic 0x80004B

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
msgbox @sign 0x5
setflag 0x200
release
end

#org @sign
= It's an email from Kira, would\nyou like to check it?

#org @done
msgbox @yes 0x6
clearflag 0x200
release
end

#org @yes
= Hi \v\h01, this is Kira.\nI went outside today to train and\lm
y
pokemon vanished! What could\lcause this?! Meet me at the\lhideout behind the gym in Wolkey\lTown, be careful \v\h01.
__________________

Youtube Channel.
  #6882    
Old May 23rd, 2012 (08:31 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,287
Quote originally posted by Hadesminion13:
Ugh I hate to ask two questions in one day, but I'm not very good at applymovements and this has me stumped

Script:
Spoiler:

#dynamic 0xE00000

#org @start
lock
faceplayer
checkflag 0x904
if 0x1 goto @end
checkflag 0x903
if 0x1 goto @cont
msgbox @fail 0x6
release
end

#org @cont
msgbox @win 0x2
applymovement 0xF @movements
hidesprite 0xF
setflag 0x904
release
end

#org @movements
#raw 0x07 0x07 0x07 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0x04 0xFE

#org @end
release
end

#org @fail
= Sorry dude, boss says\nnobody's allowed in!

#org @win
= Hey man, my boss told me\nto let you in!\pGuess it's your lucky day,\nand that means my job's done!


Now, I have another sprite somewhere else that sets the flag so flags are not an issue, my problem is that after the NPC moves off the screen my character is still locked. Other guys are still animated and stuff, the game hasn't frozen, but none of my buttons do anything. I know that it's a problem with waitmovement 0x0, because when I remove that line he disappears right away, which is the line below waitmovement, and then I can move.

AFAIK the script is correct, no compilation errors, and he actually moves, my character's just locked.

EDIT:
Alright, after a VERY long time of just sitting there, a menu appears on the top left of my screen with the options BUY and QUIT. My controls are still locked and the game appears to be frozen, but not crashing.
You forgot the "waitmovement" command after your "applymovement" command.

Code:
...
applymovement 0xF @movements
waitmovement 0xF
hidesprite 0xF
...
Quote originally posted by vanillagfx:
When you click yes it unlocks and it doesn't tell you the rest unless you talk to it again.
Spoiler:
#dynamic 0x80004B

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
msgbox @sign 0x5
setflag 0x200
release
end

#org @sign
= It's an email from Kira, would\nyou like to check it?

#org @done
msgbox @yes 0x6
clearflag 0x200
release
end

#org @yes
= Hi \v\h01, this is Kira.\nI went outside today to train and\lm
y
pokemon vanished! What could\lcause this?! Meet me at the\lhideout behind the gym in Wolkey\lTown, be careful #dynamic 0x80004B

#org @start
lock
faceplayer
checkflag 0x200
if 0x1 goto @done
msgbox @sign 0x5
setflag 0x200
release
end

#org @sign
= It's an email from Kira, would\nyou like to check it?

#org @done
msgbox @yes 0x6
clearflag 0x200
release
end

#org @yes
= Hi \v\h01, this is Kira.\nI went outside today to train and\lm
y
pokemon vanished! What could\lcause this?! Meet me at the\lhideout behind the gym in Wolkey\lTown, be careful \v\h01.
You forgot the command "compare lastresult" command after your "message (type number 5)"
Also... I don't understand why you have a "clearflag" command under your "#org @done" address...

Code:
...
msgbox @sign 0x5
compare lastresult 0x1
if 0x0 goto @no
setflag 0x200
goto @done
end

#org @no
release
end

...
__________________


FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

  #6883    
Old May 23rd, 2012 (10:41 PM). Edited May 23rd, 2012 by vanillagfx.
vanillagfx's Avatar
vanillagfx vanillagfx is offline
 
Join Date: May 2012
Gender: Male
Posts: 90
What things should I look into if I want an event like this?
When you walk into a new area the screen moves down a bit to show some people beating this guy up and they run off dropping a few pokeball sprites and they come back to grab 2 of them. o.o I'm looking at diegoisawesome tut atm trying to figure this out.

FR
__________________

Youtube Channel.
  #6884    
Old May 24th, 2012 (12:42 AM).
Satoshi Ookami's Avatar
Satoshi Ookami Satoshi Ookami is offline
Memento Mori
Gold Tier
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 23
Gender: Male
Nature: Calm
Posts: 13,376
Quote originally posted by vanillagfx:
What things should I look into if I want an event like this?
When you walk into a new area the screen moves down a bit to show some people beating this guy up and they run off dropping a few pokeball sprites and they come back to grab 2 of them. o.o I'm looking at diegoisawesome tut atm trying to figure this out.
For moving the screen, you need to use applymovement on camera (if I remember correctly it's 0x7F).
And then everything else is easily done with applymovement.
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #6885    
Old May 25th, 2012 (12:41 PM).
Awkward.'s Avatar
Awkward. Awkward. is offline
#britanna
 
Join Date: May 2012
Age: 18
Gender: Male
Nature: Sassy
Posts: 845
Honestly hoping someone here can help me.

I'm trying to hack, but I'm horrible at scripting. I've read, like, 90 different tutorials, and the one thing I can't comprehend are flags.

So, here's my script. It's used to prevent the player from leaving the town until he/she goes to see the Professor. When the player steps on it, though, it just freezes the player, and you can't do anything but quit.

So, here's the script.

Code:
'---------------
#org 0x800027
lock
checkflag 0x1000
if 0x1 goto 0x880003A
clearflag 0x1000
release
end

'---------------
#org 0x80003A
pause 0x30
msgbox 0x8800058 MSG_NORMAL '"[player]: Wait a minute!\pI can't ..."
applymovement MOVE_PLAYER 0x88000E8
waitmovement 0xFF
setflag 0x1000
release
end


'---------
' Strings
'---------
#org 0x800058
= [player]: Wait a minute!\pI can't leave just yet!\pI need to go check with Professor\nOak. Mom said he needed me for\lsomething important.\pI better go[.]


'-----------
' Movements
'-----------
#org 0x8000E8
#raw 0x10 'Step Down (Normal)
#raw 0xFE 'End of Movements
That's the script as it is now. AFAIK, there's nothing wrong with it. I assumed it had something to do with the map script, so I added this as a map script:

Code:
'---------------
#org 0x8000EA
checkflag 0x1001
if 0x0 goto 0x88000F5
end

'---------------
#org 0x8000F5
setflag 0x1000
end
The first script doesn't work no matter what; having the map script doesn't seem to do anything. I haven't edited the inside of any of the houses yet, but it should work just fine because I'm starting with flags at 1000. Is there any reason that this script isn't working right?
  #6886    
Old May 25th, 2012 (12:49 PM). Edited May 25th, 2012 by Hadesminion13.
Hadesminion13 Hadesminion13 is offline
 
Join Date: Apr 2009
Gender:
Posts: 29
Quote originally posted by destinedjagold:


You forgot the "waitmovement" command after your "applymovement" command.
Sorry, I was loading my script (So I'd have the version with pointers and before compilation. When I decompile it doesn't really do anything :/

I did have waitmovement 0x0, it didn't work. Then I thought I might need it to be 0xF, since that was my sprite's event number. It still doesn't work, not sure why.

Can anyone help me with this?

Here's the compiled version:
Spoiler:

'---------------
#org 0xE00AA0
lock
faceplayer
checkflag 0x904
if 0x1 goto 0x8E00AE6
checkflag 0x903
if 0x1 goto 0x8E00ABF
msgbox 0x8E00AE9 MSG_NORMAL '"Sorry dude, boss says\nnobody's al..."
release
end

'---------------
#org 0xE00AE6
release
end

'---------------
#org 0xE00ABF
msgbox 0x8E00B16 MSG_FACE '"Hey man, my boss told me\nto let y..."
applymovement 0xF 0x8E00AD7
waitmovement 0xF
hidesprite 0xF
setflag 0x904
if 0x7 call 0x4040407
call 0x4040404
call 0x6C00FE04
end


'---------
' Strings
'---------
#org 0xE00AE9
= Sorry dude, boss says\nnobody's allowed in!

#org 0xE00B16
= Hey man, my boss told me\nto let you in!\pGuess it's your lucky day,\nand that means my job's done!


'-----------
' Movements
'-----------
#org 0xE00AD7
#raw 0x7 'Step Right (Slow)
#raw 0x7 'Step Right (Slow)
#raw 0x7 'Step Right (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements



Quote:
#org 0x800027
lock
checkflag 0x1000
if 0x1 goto 0x880003A
clearflag 0x1000
release
end
Well, first of all, why are you clearing a flag right there? If you check your flag and use goto to go to another section of your script you never get to the clearflag. In other words, if the first checkflag succeeds, it 'teleports' to the next section of the script, but if it fails it does a clearflag, releases, and ends. If it fails, the flag is not set, meaning no reason to clear the flag. Maybe you're trying to say this?

Code:
checkflag 0x1000
if 0x0 goto 0x880003A
clearflag 0x1000
But even then I have no idea why you'd ever want to set that flag anyways, seeing as how it would just set it and clear it as soon as you talked to him again.

After thinking about this again I just realized you could easily do something like this:

Code:
lock
faceplayer
checkflag 0x1000
if 0x1 goto LET_PLAYER_PASS_OR_REMOVE_THE_GUYS_SPRITE
msgbox @sayinstuff 0x6
APPLYOVEMENTS HERE
release
end
Then have some other event somewhere else set flag 0x1000 and you're set!
[/CODE]
__________________

Feed Me!

Adopted from Valenth
  #6887    
Old May 25th, 2012 (01:41 PM).
Awkward.'s Avatar
Awkward. Awkward. is offline
#britanna
 
Join Date: May 2012
Age: 18
Gender: Male
Nature: Sassy
Posts: 845
Quote originally posted by Hadesminion13:
Well, first of all, why are you clearing a flag right there? If you check your flag and use goto to go to another section of your script you never get to the clearflag. In other words, if the first checkflag succeeds, it 'teleports' to the next section of the script, but if it fails it does a clearflag, releases, and ends. If it fails, the flag is not set, meaning no reason to clear the flag. Maybe you're trying to say this?

Code:
checkflag 0x1000
if 0x0 goto 0x880003A
clearflag 0x1000
But even then I have no idea why you'd ever want to set that flag anyways, seeing as how it would just set it and clear it as soon as you talked to him again.

After thinking about this again I just realized you could easily do something like this:

Code:
lock
faceplayer
checkflag 0x1000
if 0x1 goto LET_PLAYER_PASS_OR_REMOVE_THE_GUYS_SPRITE
msgbox @sayinstuff 0x6
APPLYOVEMENTS HERE
release
end
Then have some other event somewhere else set flag 0x1000 and you're set!
[/CODE]
Er, I wasn't really using a person, just a script trap. I guess using a person would be better.

So, what you're saying is, I should just program the script without setflag/clearflag stuff, and have another script work all of that out instead?
  #6888    
Old May 25th, 2012 (02:07 PM).
Imperialdramon123's Avatar
Imperialdramon123 Imperialdramon123 is offline
 
Join Date: May 2012
Location: USA
Age: 20
Gender: Male
Nature: Quiet
Posts: 4
hi dude would you please help me i'm making a hack for pokemon ruby and i wanted to make a script using PKSV to allow the pokemon picture to appear while talking to the person like in the hack which is called : Pokemon Ruby Destiny-Life of Guardian i think so and i did every thing right but when i talk to him the pokemon colors appears to different like this/imageshackDOTus/photo/my-images/72/imageerrorDOTpng/
Ill be really happy if you helped and sorry if it was a long message
  #6889    
Old May 25th, 2012 (02:21 PM).
Hadesminion13 Hadesminion13 is offline
 
Join Date: Apr 2009
Gender:
Posts: 29
Quote originally posted by PJBottomz:
Er, I wasn't really using a person, just a script trap. I guess using a person would be better.

So, what you're saying is, I should just program the script without setflag/clearflag stuff, and have another script work all of that out instead?
Yeah, the only thing your current script would have to do is check your flag. The person vs. script trap thing is whatever you want it to be, if your story (Or whatever you're doing) applies more to a person blocking your way, use a person. If, say, you want a script to block you from going out to sea because the tides are too strong, you'd throw in some character judgement and use a script trap.

Like I said, totally up to you, I just recommend that you use an event to trigger your current script, or if you want you could even do it all with one script and every time you run this script have a line that checks if you've done something. If so it checks your flag and continues with the other script, then stops checking the old flag.

If the last part was confusing I'd just stick with another event triggering it like I was saying earlier, the all-in-one-script method would be an unnecessary amount of work if you don't understand it.

Quote originally posted by Imperialdramon123:
hi dude would you please help me i'm making a hack for pokemon ruby and i wanted to make a script using PKSV to allow the pokemon picture to appear while talking to the person like in the hack which is called : Pokemon Ruby Destiny-Life of Guardian i think so and i did every thing right but when i talk to him the pokemon colors appears to different like this/imageshackDOTus/photo/my-images/72/imageerrorDOTpng/
Ill be really happy if you helped and sorry if it was a long message
I don't care about the length (That's what she said xD), I myself tend to write really long messages too.

Can you post your script here? I haven't really done that recently so I'm not really sure without reading through.
__________________

Feed Me!

Adopted from Valenth
  #6890    
Old May 25th, 2012 (02:42 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,287
Quote originally posted by Hadesminion13:
Sorry, I was loading my script (So I'd have the version with pointers and before compilation. When I decompile it doesn't really do anything :/

I did have waitmovement 0x0, it didn't work. Then I thought I might need it to be 0xF, since that was my sprite's event number. It still doesn't work, not sure why.

Can anyone help me with this?

Here's the compiled version:
Spoiler:

'---------------
#org 0xE00AA0
lock
faceplayer
checkflag 0x904
if 0x1 goto 0x8E00AE6
checkflag 0x903
if 0x1 goto 0x8E00ABF
msgbox 0x8E00AE9 MSG_NORMAL '"Sorry dude, boss says\nnobody's al..."
release
end

'---------------
#org 0xE00AE6
release
end

'---------------
#org 0xE00ABF
msgbox 0x8E00B16 MSG_FACE '"Hey man, my boss told me\nto let y..."
applymovement 0xF 0x8E00AD7
waitmovement 0xF
hidesprite 0xF
setflag 0x904
if 0x7 call 0x4040407
call 0x4040404
call 0x6C00FE04
end


'---------
' Strings
'---------
#org 0xE00AE9
= Sorry dude, boss says\nnobody's allowed in!

#org 0xE00B16
= Hey man, my boss told me\nto let you in!\pGuess it's your lucky day,\nand that means my job's done!


'-----------
' Movements
'-----------
#org 0xE00AD7
#raw 0x7 'Step Right (Slow)
#raw 0x7 'Step Right (Slow)
#raw 0x7 'Step Right (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements
I think it's because of this line of code...
Code:
...
#org 0xE00ABF
msgbox 0x8E00B16 MSG_FACE '"Hey man, my boss told me\nto let y..."
applymovement 0xF 0x8E00AD7
waitmovement 0xF
hidesprite 0xF
setflag 0x904
if 0x7 call 0x4040407
call 0x4040404
call 0x6C00FE04
end
There are no commands before that(in red) that requires an 'if' statement.
Also, where does the 4040404 address even lead?
I guess is that this script has glitched up at the very end.
Try and compile your script again in a different free space address.
__________________


FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

  #6891    
Old May 25th, 2012 (09:05 PM).
vanillagfx's Avatar
vanillagfx vanillagfx is offline
 
Join Date: May 2012
Gender: Male
Posts: 90
First time doing apply movement trying to make it so when you walk on the script event you look around but it freezes for me. I didn't add anything to the side panel of the event but the script offset couldn't understand what he was doing on diegos script tutorial but yeah. FireRed
Spoiler:
#dynamic 0x800383

#org @start
applymovement 0x1 @move1
waitmovement 0x1
applymovement 0x1 @move2
waitmovement 0x1
applymovement 0x1 @move3
waitmovement 0x1
applymovement 0x1 @move4
waitmovement 0x1
msgbox @lonely 0x6
release
end

#org @move1
#raw 0x2
#raw 0xFE

#org @move2
#raw 0x1
#raw 0xFE

#org @move3
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x4
#raw 0xFE

#org @lonely
= ..........\nWhere the hell am I?
__________________

Youtube Channel.
  #6892    
Old May 25th, 2012 (10:44 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by vanillagfx:
First time doing apply movement trying to make it so when you walk on the script event you look around but it freezes for me. I didn't add anything to the side panel of the event but the script offset couldn't understand what he was doing on diegos script tutorial but yeah. FireRed
Spoiler:
#dynamic 0x800383

#org @start
applymovement 0x1 @move1
waitmovement 0x1
applymovement 0x1 @move2
waitmovement 0x1
applymovement 0x1 @move3
waitmovement 0x1
applymovement 0x1 @move4
waitmovement 0x1
msgbox @lonely 0x6
release
end

#org @move1
#raw 0x2
#raw 0xFE

#org @move2
#raw 0x1
#raw 0xFE

#org @move3
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x4
#raw 0xFE

#org @lonely
= ..........\nWhere the hell am I?
The reason why it is freezing is because, as you said, you haven't edited the side panel. Just copy exactly what diegoisawesome has done in his tutorial unless you have used the variable 0x4050 beforehand. If you have used it previously then place another variable that you aren't using. Also, that script is going to activate every time you step on it so I would advise placing a setflag command so it doesn't trip when it is no longer necessary, or put in a set/add/subvar command that changes the variable which you put into the side panel (If the variable's value is not equal to the number in the 'Var value' box then the screen script will not activate).
__________________
  #6893    
Old May 26th, 2012 (12:52 AM).
vanillagfx's Avatar
vanillagfx vanillagfx is offline
 
Join Date: May 2012
Gender: Male
Posts: 90
Quote originally posted by DrFuji:
The reason why it is freezing is because, as you said, you haven't edited the side panel. Just copy exactly what diegoisawesome has done in his tutorial unless you have used the variable 0x4050 beforehand. If you have used it previously then place another variable that you aren't using. Also, that script is going to activate every time you step on it so I would advise placing a setflag command so it doesn't trip when it is no longer necessary, or put in a set/add/subvar command that changes the variable which you put into the side panel (If the variable's value is not equal to the number in the 'Var value' box then the screen script will not activate).
Well where he put 300 in unknown I can't b/c I only have enough spaces for 2 numbers, the text does go off though just doesn't move.
__________________

Youtube Channel.
  #6894    
Old May 26th, 2012 (01:19 AM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by vanillagfx:
Well where he put 300 in unknown I can't b/c I only have enough spaces for 2 numbers, the text does go off though just doesn't move.
Ah, you must be using Advance Map 1.95 rather than 1.92 like he was. Put 03 in the unknown box instead.
__________________
  #6895    
Old May 26th, 2012 (09:58 AM).
vanillagfx's Avatar
vanillagfx vanillagfx is offline
 
Join Date: May 2012
Gender: Male
Posts: 90
Eh I still think I'm doing something wrong,ima noob....
Spoiler:
#dynamic 0x800383

#org @start
checkflag 0x828
applymovement 0xFF @move1
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
applymovement 0xFF @move3
waitmovement 0x0
applymovement 0xFF @move4
waitmovement 0x0
msgbox @lonely 0x6
setflag 0x828
release
end

#org @move1
#raw 0x2
#raw 0xFE

#org @move2
#raw 0x1
#raw 0xFE

#org @move3
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x4
#raw 0xFE

#org @lonely
clearflag 0x828
= ..........\nWhere the hell am I?
__________________

Youtube Channel.
  #6896    
Old May 26th, 2012 (04:13 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by vanillagfx:
Eh I still think I'm doing something wrong,ima noob....
Spoiler:
#dynamic 0x800383

#org @start
checkflag 0x828
applymovement 0xFF @move1
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
applymovement 0xFF @move3
waitmovement 0x0
applymovement 0xFF @move4
waitmovement 0x0
msgbox @lonely 0x6
setflag 0x828
release
end

#org @move1
#raw 0x2
#raw 0xFE

#org @move2
#raw 0x1
#raw 0xFE

#org @move3
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x4
#raw 0xFE

#org @lonely
clearflag 0x828
= ..........\nWhere the hell am I?
Your flag commands are all over the place. You have no 'if' command after your checkflag to determine whether you've been there and there should not be a clearflag anywhere in your script, particularly under the @lonely pointer which is for text rather than commands.

Try this (changes in red):

Spoiler:
#dynamic 0x800000 // Script will be automatically in the first offset that is free when using #dynamic

#org @start
checkflag 0x828
if 0x1 goto @skip // The if command allows you to check the compare a value to the last thing you queried (your checkflag). n this case we are determining whether you have it set and if you do you should jump to the @skip pointer
applymovement 0xFF @move1
pause 0x10 // I've removed the waitmovement commands and added short pauses after each applymovement because the animations change very fast and you would hardly see the player turn around
applymovement 0xFF @move2
pause 0x10
applymovement 0xFF @move3
pause 0x10
applymovement 0xFF @move4
pause 0x10
msgbox @lonely 0x6
setflag 0x828
release
end

#org @skip
release
end


#org @move1
#raw 0x2
#raw 0xFE

#org @move2
#raw 0x1
#raw 0xFE

#org @move3
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x4
#raw 0xFE

#org @lonely
= ..........\nWhere the hell am I?
__________________
  #6897    
Old May 26th, 2012 (08:24 PM). Edited May 26th, 2012 by vanillagfx.
vanillagfx's Avatar
vanillagfx vanillagfx is offline
 
Join Date: May 2012
Gender: Male
Posts: 90
Okay I got it to work thanks but how do I set up the flags or w.e if I wanted a script to stop you from leaving the map until you talk to something like a pc for example? How do I tie them both together?

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x200
if 0x1 goto @skip
applymovement 0xFF @move1
pause 0x20
msgbox @nohoe 0x6
setflag 0x200
end

#org @skip
release
end

#org @move1
#raw 0x4
#raw 0xFE

#org @nohoe
= Should look around for clues first.
__________________

Youtube Channel.
  #6898    
Old May 26th, 2012 (09:38 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by vanillagfx:
Okay I got it to work thanks but how do I set up the flags or w.e if I wanted a script to stop you from leaving the map until you talk to something like a pc for example? How do I tie them both together? :pirate:

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x200
if 0x1 goto @skip
applymovement 0xFF @move1
pause 0x20
msgbox @nohoe 0x6
setflag 0x200
end

#org @skip
release
end

#org @move1
#raw 0x4
#raw 0xFE

#org @nohoe
= Should look around for clues first.
You should set a flag in the script that the player must complete before they are allowed to leave - In this instance you would remove the 'setflag 0x828' command from the script you've provided and put that exact same command into the PC script. This way once the player has interacted with the first script they will have everything necessary to get by the second one.
__________________
  #6899    
Old May 26th, 2012 (10:26 PM).
vanillagfx's Avatar
vanillagfx vanillagfx is offline
 
Join Date: May 2012
Gender: Male
Posts: 90
Okay well everything worked fine but when I go back to the room the script resets. Also how do you do move camera don't see it in diegos tut.

PC
Spoiler:
'---------------
#org 0x800184
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x88001E5
msgbox 0x88001AF MSG_YESNO '"It's an email from Kira, would\nyo..."
compare LASTRESULT 0x1
if 0x0 goto 0x88001AC
setflag 0x200
goto 0x88001E5

'---------------
#org 0x8001E5
msgbox 0x88001F3 MSG_NORMAL '"Hi [player], this is Kira. I\nwent..."
release
end

'---------------
#org 0x8001AC
release
end


'---------
' Strings
'---------
#org 0x8001AF
= It's an email from Kira, would\nyou like to open it?

#org 0x8001F3
= Hi [player], this is Kira. I\nwent outside today to train\land my pokemon vanished right in\lfront of me! What could cause\lthis to happen?! Meet me at\lthe hideout behind the gym in\lWolkey Town, be careful [player].


Script
Spoiler:
#dynamic 0x800885

#org @start
checkflag 0x200
if 0x1 goto @skip
msgbox @nohoe 0x6
applymovement 0xFF @move1
pause 0x20
end

#org @skip
clearflag 0x200
release
end

#org @move1
#raw 0x4
#raw 0x1D
#raw 0xFE

#org @nohoe
= Should look around for clues first.
__________________

Youtube Channel.
  #6900    
Old May 26th, 2012 (10:59 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,287
Quote originally posted by vanillagfx:
Okay well everything worked fine but when I go back to the room the script resets. Also how do you do move camera don't see it in diegos tut.

PC
Spoiler:
'---------------
#org 0x800184
lock
faceplayer
checkflag 0x200
if 0x1 goto 0x88001E5
msgbox 0x88001AF MSG_YESNO '"It's an email from Kira, would\nyo..."
compare LASTRESULT 0x1
if 0x0 goto 0x88001AC
setflag 0x200
goto 0x88001E5

'---------------
#org 0x8001E5
msgbox 0x88001F3 MSG_NORMAL '"Hi [player], this is Kira. I\nwent..."
release
end

'---------------
#org 0x8001AC
release
end


'---------
' Strings
'---------
#org 0x8001AF
= It's an email from Kira, would\nyou like to open it?

#org 0x8001F3
= Hi [player], this is Kira. I\nwent outside today to train\land my pokemon vanished right in\lfront of me! What could cause\lthis to happen?! Meet me at\lthe hideout behind the gym in\lWolkey Town, be careful [player].


Script
Spoiler:
#dynamic 0x800885

#org @start
checkflag 0x200
if 0x1 goto @skip
msgbox @nohoe 0x6
applymovement 0xFF @move1
pause 0x20
end

#org @skip
clearflag 0x200
release
end

#org @move1
#raw 0x4
#raw 0x1D
#raw 0xFE

#org @nohoe
= Should look around for clues first.
Your PC script is fine.
The only thing that's wrong there is this line...
Code:
...#org @skip
clearflag 0x200
release
end
...
In that line of code, you are telling the ROM to clear the flag again, so of course, the scripts that uses to check that flag will reset.
__________________


FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

Closed Thread
Quick Reply

Sponsored Links

You may also like.. (Beta)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 10:06 PM.