View Single Post
  #22986    
Old October 18th, 2012 (12:59 PM).
Jambo51's Avatar
Jambo51 Jambo51 is offline
Glory To Arstotzka
 
Join Date: Jun 2009
Gender: Male
Nature: Quiet
Posts: 730
Quote originally posted by borisjo:
Thank you for replying! But I have no idea how to make this levelscript type 5 to work, I've tried many things but the screen stays black when I come back to the map after a battle. I hope you know how I can solve this? I have added the script here:

Script removed for brevity.
You can't execute scripts like that using type 5 level scripts. It explicity requires type 2, which in turn, is variable reliant.

Try setting a variable you haven't used inside the type 5 script:
Spoiler:
#dynamic 0x800000

#org @main
[Checks for caught Pokémon]
[If not caught, branch to @alt]
setvar 0x40F0 0x1
end

#org @alt
end


And then putting the "exit" script in the type 2 level script slot, using (in my example) var 0x40F0 as the control value, and set the "value" to 1.

Your script requires some modification, because you can't warp and then continue execution of the script, so it needs split up into 2 parts.

Type 2 level script (Map 1, same map as type 5 script from above):
Spoiler:
lock
msgbox @1 0x2
warp 0x0 0x05 0xFF 0x1A 0x0E
waitstate
setvar 0x40F0 0x2
release
end

#org @1
= Attention! We have our\nlast member: \vh01!


Finally, you need to (in the map you warp back to) add yet another type 2 level script which contains the remaining movement part. The var is still 0x40F0, but the value is now 2:
Spoiler:
lock
applymovement 0xFF @move
waitmovement 0x0
setvar 0x40F0 0x3
release
end

#org @move
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE


I know for a fact that the last 2 parts will work, but I'm not sure about the type 5 level script part. It's worth a try. If it doesn't work, you're looking at ASM hacking to get your desired result, and that's not fun.
__________________
Hey guys, please check out my recreations of the gen 1 and 2 music on my custom engine at my SoundCloud! - Here!