The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script setting event position

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old May 18th, 2017 (8:34 AM). Edited May 25th, 2017 by ASDBUDDY.
ASDBUDDY's Avatar
ASDBUDDY ASDBUDDY is offline
The Derp
 
Join Date: Apr 2017
Location: aint gonna tell ya
Age: 22
Gender: Male
Nature: Docile
Posts: 347
Hi,so I had placed a gaurd at the end of a map who lets you pass after completing a task but after doing that when enter the map back the person event returns to its og postition and as the flag is set it doesn't move again how do i change the person event's pos so that it stays out of the way even after i enter the map again.
__________________
https://discord.gg/bEwyPd7
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 23rd, 2017 (11:26 AM).
Teh Blazer's Avatar
Teh Blazer Teh Blazer is offline
Divider of Zero
 
Join Date: Feb 2009
Location: 'MERICA
Age: 27
Gender: Male
Nature: Relaxed
Posts: 776
Quote:
Originally Posted by ASDBUDDY View Post
Hi,so I had placed a gaurd at the end of a map who lets you pass after completing a task but after doing that when enter the map back the person event returns to its og postition and as the flag is set it doesn't move again how do i change the person event's pos so that it stays out of the way even after i enter the map again.
Are you saying that the NPC is at location 1, you make a script that makes them move to location 2 in the map, but once you exit the map and return they're still at location 1?

For that you have to create a level script (which hopefully you know how to do, diegoeisawesome's XSE level script guide tells you how to make level scripts step-by-step).

The script will essentially look like this:
Spoiler:

#dynamic 0xwhatever

#org @start
checkflag 0x[whatever you set in the script]
if 0x1 goto @moveNPC
end

#org @moveNPC
movesprite 0x[NPC ID] 0x[X-Position of location2] 0x[Y-Position of location2]
end

This'll make it so once you set the flag in your original script, the level script will be active and manually move the NPC to location2 every time you enter the map as you enter the map. And rather than the Level Script Type being 0x2 like it is in diegoisawesome's tutorial, since you're only moving NPC's around and not making people talk or anything, you use 0x5.
__________________
Being a hero is overrated anyways
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 23rd, 2017 (10:48 PM).
ASDBUDDY's Avatar
ASDBUDDY ASDBUDDY is offline
The Derp
 
Join Date: Apr 2017
Location: aint gonna tell ya
Age: 22
Gender: Male
Nature: Docile
Posts: 347
Quote:
Originally Posted by Teh Blazer View Post
Are you saying that the NPC is at location 1, you make a script that makes them move to location 2 in the map, but once you exit the map and return they're still at location 1?

For that you have to create a level script (which hopefully you know how to do, diegoeisawesome's XSE level script guide tells you how to make level scripts step-by-step).

The script will essentially look like this:
Spoiler:

#dynamic 0xwhatever

#org @start
checkflag 0x[whatever you set in the script]
if 0x1 goto @moveNPC
end

#org @moveNPC
movesprite 0x[NPC ID] 0x[X-Position of location2] 0x[Y-Position of location2]
end

This'll make it so once you set the flag in your original script, the level script will be active and manually move the NPC to location2 every time you enter the map as you enter the map. And rather than the Level Script Type being 0x2 like it is in diegoisawesome's tutorial, since you're only moving NPC's around and not making people talk or anything, you use 0x5.
Oh, ok got it! tho i didn't understand the lvl script type in Diego's XSE tutorial(sorry noob here) but i do understand lvl scripts(kinda cuz i made one right now actually) but thank you so much, I'll try making one thanks :)
__________________
https://discord.gg/bEwyPd7
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content
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 GMT -8. The time now is 9:14 AM.