View Single Post
  #2695    
Old December 17th, 2009 (04:10 AM). Edited December 17th, 2009 by Giga Universe.
Giga Universe's Avatar
Giga Universe Giga Universe is offline
Working on a tool.
Crystal Tier
 
Join Date: Aug 2007
Location: South Africa
Age: 20
Gender: Male
Nature: Calm
Posts: 121
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe
I'm trying to build a script where an overworld follows the player throughout the map. So far, it is working, except for the fact that the player cannot interact with ANYTHING, so, in other words, the player can walk through walls, not read signs/talk to people or even use warps. Another bug in the script is that all animations (flowers/sea/etc) do not play until you move. Also, you cannot open the start menu, and I assume if you have registered an item to select it won't activate, as nothing else works, but I haven't tested this. If anyone has any ideas on how to fix this up please do so!

Game: FireRed (U)
Type: Level Script (Script type 2 in AMap. Flag is 7001)
Script Editor: XSE
Script: (EDIT: Almost forgot to Add: Uses JPan's Fire Red Hacked Engine!)
Spoiler:
#dynamic 0x800000 'asumes 800000 is free. Script by Giga Universe. Do not steal!

#org @start
setvar 0x7001 0x1 'make level script work by setting level flag
getplayerpos 0x7002 0x7003 'store players coords
goto @cont 'goto new offset to create loop
end

#org @cont
special2 0x8006 0x2c 'check D-Pad with JPans built in ROM Base
compare 0x8006 0x1 'check if up is pressed
if 0x1 goto @up 'handle return
compare 0x8006 0x2 'check if left is pressed
if 0x1 goto @left 'handle return
compare 0x8006 0x3 'check if down is pressed
if 0x1 goto @down 'handle return
compare 0x8006 0x4 'check if right is pressed
if 0x1 goto @right 'handle return
compare 0x8006 0x0 'failsafe if nothing is pressed
if 0x1 goto @not_yet 'handle failsafes return
goto @not_yet 'another failsafe
end

#org @not_yet
goto @cont 'loop if nothing is pressed
end

#org @up
applymovement 0xFF @move_up 'move player
waitmovement 0xFF 'wait for player
getplayerpos 0x7002 0x7003 'store players coords
addvar 0x7003 0x1 'adjust the players coords to behind the player
movesprite 0x01 0x7002 0x7003 'moves the follower behind you
applymovement 0x1 @move_up 'smooths up the animation of the follower
goto @cont 'loop
end

#org @down
applymovement 0xFF @move_down 'move player
waitmovement 0xFF 'wait for player
getplayerpos 0x7002 0x7003 'store players coords
subvar 0x7003 0x1 'adjust the players coords to behind the player
movesprite 0x01 0x7002 0x7003 'moves the follower behind you
applymovement 0x1 @move_down 'smooths up the animation of the follower
goto @cont 'loop
end

#org @left
applymovement 0xFF @move_left 'move player
waitmovement 0xFF 'wait for player
getplayerpos 0x7002 0x7003 'store players coords
addvar 0x7002 0x1 'adjust the players coords to behind the player
movesprite 0x01 0x7002 0x7003 'moves the follower behind you
applymovement 0x1 @move_left 'smooths up the animation of the follower
goto @cont 'loop
end

#org @right
applymovement 0xFF @move_right 'move player
waitmovement 0xFF 'wait for player
getplayerpos 0x7002 0x7003 'store players coords
subvar 0x7002 0x1 'adjust the players coords to behind the player
movesprite 0x01 0x7002 0x7003 'moves the follower behind you
applymovement 0x1 @move_right 'smooths up the animation of the follower
goto @cont 'loop
end

#org @move_up
#raw 0x11 'move up
#raw 0xFE 'end movements

#org @move_down
#raw 0x10 'move down
#raw 0xFE 'end movements

#org @move_left
#raw 0x12 'move left
#raw 0xFE 'end movements

#org @move_right
#raw 0x13 'move right
#raw 0xFE 'end movements

Media (Video):
Spoiler:

__________________