RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[RESOLVED] Events based on hero location...

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 87
...I'M HUNGRY! Food plawks
I'm not sure how to phrase this clearly, so i'll give the full example.

I want to make an interactive world map. When the hero stands ON an event, and only then, the next directional key press automatically moves him to the next split in the path/visitable location.

I have all of that evented fine. The problem is that the event:
1. is marked by arrows, and I want them to vanish if the hero moves off their square.
2. Performs the movements when the key is pressed when the hero is ADJACENT to the event.

to summarize, how can I make the event only recognize the key inputs when the hero is ON the event, not just touching it, and how can I make the graphic change when the hero is no longer ON the event?

Any help would be appreciated.
« Last Edit: April 23, 2007, 02:54:37 PM by Zeriab »

pokeball :)OfflineMale
********
Cheese
Rep:
Level 95
?
make the event hero touch yes, then you can show choices "move left" more right, then after they select the choice have the set move route to player and move them where they should. Then have move route again and this time on the event and do change event graphic.
Watch out for: HaloOfTheSun

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Okay, so ... you want them to move only if they are on the square when they press the key, but not if they are adjacent and then walk onto the event? You could do it by keeping track of the Player's Map X and Map Y and condition the event on the hero being on that square. I.e., that the Player's Map X variable = the event X and the Player's Map Y variable = the event's Y... I don't get what you mean by the arrows thingy...

***
Rep:
Level 87
...I'M HUNGRY! Food plawks
... I don't get what you mean by the arrows thingy...

The arrows are a an event graphic. I managed to solve both of these problems on my own, but now a similar question has arisen: I have dots appear over a visitable location when the player pressed the appropriate arrow key (i.e the location is above you and you press UP). How would I make these dots (event graphics) disappear once the player A: visits that area (hits enter, activating the teleport in the event) or B: changes their mind and presses a different arrow key (thereby activating the event they are standing on, casuing them to automatically move to the next intersection/dungeon)

Am I still making sense? I'ts waaay to late for me to be doing this kind of eventing  ;9

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, I'd need to see how you are doing the event first. Is there a loop involved? There are a number of ways to event this, so I can't tell what the best way is unless you show me the event. I would suggest controlling the dot graphic with a switch which is activated when you press the appropriate direction key and de-activated when you press any other (this could also be done with a single variable), but again, I am not sure what the most efficient way is until I see how you are doing the event.

***
Rep:
Level 87
...I'M HUNGRY! Food plawks
I'm not really sure the best way to show a picture of what I'm after, so let me try to explain one more time.

While you're on square A, a graphic appears, and you can press the action key to enter the map. When you move OFF square A, the graphic disappears.

I just now started working with variables, so a solution involving them would be satisfactory.

Thanks again

One other question: How can I make demos work when I get the incompatibility error? I tried everything listed in the FAQ (http://rmrk.net/index.php/topic,6835.0.html) and none of it made any difference. Im using the PK version though...im assuming thats the cause of all my misery? Anyone know how to fix it?
« Last Edit: April 18, 2007, 07:22:55 AM by Yawgmothsbud »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Okay, well here is how I would do it then: Make a parallel process event which does the following:

Condition: Player is on Square A (this can be done by using variables which track Player position (Character: Player X, Player Y))

So maybe, more like this: (If, for example, square A is (4,3)

Control Variable: [001: Player X] = [Player]'s Map X
Control Variable: [002: Player Y] = [Player]'s Map Y
Conditional Branch: Variable [001: Player X] = 4
    Conditional Branch: Variable [002: Player Y] = 3
         Show Picture 1 [Location Dot]
    Else
         Erase Picture 1
    Branch END
Else
    Erase Picture 1
Branch END

That's how I'd do it, and I'd just make a similar conditional branch for each place on the map like that.

***
Rep:
Level 87
...I'M HUNGRY! Food plawks
Okay, well here is how I would do it then: Make a parallel process event which does the following:

Condition: Player is on Square A (this can be done by using variables which track Player position (Character: Player X, Player Y))

So maybe, more like this: (If, for example, square A is (4,3)

Control Variable: [001: Player X] = [Player]'s Map X
Control Variable: [002: Player Y] = [Player]'s Map Y
Conditional Branch: Variable [001: Player X] = 4
    Conditional Branch: Variable [002: Player Y] = 3
         Show Picture 1 [Location Dot]
    Else
         Erase Picture 1
    Branch END
Else
    Erase Picture 1
Branch END

That's how I'd do it, and I'd just make a similar conditional branch for each place on the map like that.

If I use this method, I will eventually end up with perhaps hundreds of paralell processes at once ( this is my world map). Will that lead to lagg, or game crashes? I'm not sure how PP's work...are they all really "paralell" as in constantly running and checking if their conditional criteria is satisfied? Let me know if I should be worried about this...and I'd really like some advice on getting demos to work, if anyone knows how...do I need a different RGSS.dll name for PK?

BTW Algebra, I just noticed your email. are you/were you homeschooled? I was too  ;D
« Last Edit: April 18, 2007, 02:51:59 PM by Yawgmothsbud »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, you can just put it all in one parallel process. It won't lag too much, because basically the program will only run through a maximum of 100 commands (because if it checks a con. branch and the test fails, the program doesn't read what's under it.

And yes, I was homeschooled for grades 4, 6, 7, and 8. Are you really 6'10? I'm 6'6 and I get a lot of comments on my height. I can't imagine what it is for you.

***
Rep:
Level 87
...I'M HUNGRY! Food plawks
Sweet, I got it all working. Thanks alot guys. And yes, I AM 6"10...and I do hear about it once or twice a day  :o

The second question is usually if I play basketball...I don't  :tpg:

*
A Random Custom Title
Rep:
Level 96
wah
This is my post: Read Nouman's sig. XD Not to sound rude and commanding, though.

***
Rep:
Level 87
...I'M HUNGRY! Food plawks
This is my post: Read Nouman's sig. XD Not to sound rude and commanding, though.

Uh...what?

IF anyone knows how to actually fix the incompatability problem, please post it. Ill repost it on its own if no one knows  :o

And yes, i tried swapping the RGSS.dlls...didnt work.

*
A Random Custom Title
Rep:
Level 96
wah
Just make a new project and move the thing from the new project into the one you want to open. The "thing" is the thing you double-click to open up the project.

***
Rep:
Level 87
...I'M HUNGRY! Food plawks
NVM, it all works now...thanks for all the help, gentlemen  8)
« Last Edit: April 19, 2007, 12:10:42 AM by Yawgmothsbud »