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.
Events - Local Variables

0 Members and 1 Guest are viewing this topic.

********
Rep:
Level 96
2011 Most Missed Member2010 Zero To Hero
Is there a way to, like local switches, create local variables for an instance?

I'm going to have events appear the game map to represent enemies, ala (of course) Earthbound, Tales of Symphonia, etc.

Instead of making 1000 variables for every individual object's X and Y position, it would make more sense to compare an event's location compared to the player's locally.

Is this possible? Am I missing something and overcomplicating this?

Inquiring minds need to know.

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
Just use "Event touch"?
&&&&&&&&&&&&&&&&

********
Rep:
Level 96
2011 Most Missed Member2010 Zero To Hero
Doesn't work that way.

Event touch, with the system I'm attempting to produce, will not function unless the player walks into the event, and not the other way around. Furthermore, that does not provide the event with other necessary information.

I am attempting to craft a way to give the event a sight range. It wanders aimlessly until the player comes within a certain number of pixels. When that occurs, it takes on a type of movement pattern native to its designation. If the player then moves outside of a SECOND range, then the event walks home.

********
Rep:
Level 96
2011 Most Missed Member2010 Zero To Hero
Turns out Yanfly made a script for event chasing- but I still would like to know about local variables.

*
Rep:
Level 85
I solve practical problems.
For taking arms in the name of your breakfast.
I don't believe so

********
Rep:
Level 96
2011 Most Missed Member2010 Zero To Hero
Well that's just silly.

*
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Rep:
Level 96
&&&&&&&&&&&&&&&&&&&&&&&&&&&
GIAW 14: 2nd Place (Hard Mode)2013 Biggest Drama Whore2013 Zero to HeroParticipant - GIAW 11Secret Santa 2013 ParticipantFor taking arms in the name of your breakfast.
lots of higgamo jig, eh? ruffinilly uppnof, i say. Rottin nothing loking fo the way out he sai. oi, boit ol.

Can you do math? I mean, can RMVXA do maths? Like...
Monster one's Y = Var[mon1y]
Monster one's X = Var[mon1x]
Player's Y = Var[playy]
Player's X = Var[playx]

Then do like... Var[mon1y] - Var[playy] = Var[mon1Distance]

If  Var[mon1Distance] > 10 THEN nothing
If  Var[mon1Distance] = 10 THEN towards player
If  Var[mon1Distance] < 10 THEN enemy specific action

or something.

also.

word.

and period. or in this case, two words... now broken sentence. what the hell am i even doing
no period

pleasekillme.jpg
&&&&&&&&&&&&&&&&

*
Rep:
Level 85
I solve practical problems.
For taking arms in the name of your breakfast.
What he said ^ Maybe have a set number of XY variable pairs per map that represent monster and player locations, then you just update them on map transfer.