Fantasist's Tips for Eventers

Started by Fantasist, January 08, 2008, 01:18:30 pm

Previous topic - Next topic

Satoh

October 21, 2008, 11:22:30 pm #20 Last Edit: October 21, 2008, 11:30:20 pm by Satoh
Quote from: Fantasist on February 20, 2008, 08:51:32 am
EDIT: Added "Get All Items".

PS: Do anyone even find this useful?



Until just now I had no idea it existed, however I find it EXTREMELY useful... I've been puzzling over player and event coords for days now... and the hypot function is awesome!

is there any way to check a player/event's direction (well, rather, could you list it here?) ((I know there's a way, I just don't know what it is...))

EDIT: Powered up for this glittering gem of knowledge, and I'm surprised it hasn't attained stickitude yet....
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Aqua

Quote from: Satoh on October 21, 2008, 11:22:30 pm
is there any way to check a player/event's direction (well, rather, could you list it here?) ((I know there's a way, I just don't know what it is...))


Control Variables > Character > (Choose what character) > Direction - 3rd in the dropdown.

Remember that
2 - Down
4 - Left
6 - Right
8 - Up

:)

Satoh

Is there a code equivalent to that as well?

I want to be able to test if both the direction and the distance of the player relative to the event is a certain value and only execute the action if both are true.

One could say a event-sight pattern... I'm sure I could dig through the stealth demo and try to find the relevant information in there... but decompiling the events is actually more confusing than pure script... to me...
Requesting Rule #1: BE SPECIFIC!!

Light a man a fire and he'll be warm for a night...
Light a man afire and he'll be warm for the rest of his life... ¬ ¬;

My Resources

Fantasist

October 23, 2008, 03:50:38 am #23 Last Edit: October 23, 2008, 04:31:44 am by Fantasist
I'm not using my laptop now, but hang on, I have just the thing. Wait, I posted this somewhere in the scripts section. I'll look it up...

EDIT: I dug it in my laptop, but I realized it only returns where the first event is. I'll have to tweak the code. Could you wait for one day max? I'm working on it.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews





Karltheking4

I know I'm necroposting, but I could really do with some help, and I dont really want to start a new topic.
(I'm not hurting anyone!)

Anyway, I have this
if $game_player.x = $game_map.events[14].x
and this
if $game_player.y = $game_map.events[14].y
inside conditional branches, but it's not co-operating...

What am I doing wrong?!?

Ryex

to compare two objects as equal use the == operator = justs sets values
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Karltheking4

September 03, 2010, 02:16:56 am #27 Last Edit: October 02, 2010, 01:39:21 am by Karltheking4
Haha! :haha: :haha:
thankyou so much!
I knew I wasn't doing something right!
And it also works with variables!
$game_variables[#] == $game_map.events[#].x

Brilliant!
Thanks again! :haha:

Karltheking4

Hey, umm, could someone tell me something else real quick?
How do could I make it for THIS map events x and y co-ordinates, instead of having to change the id number for every event?
thanks! :P

Karltheking4

Hurray for triple posts! :^_^':
Just thought 'd stop and say I'm a little surprised I'm the first one to relise this, because I'm the biggest n00b at scripting, but here, have this
$game_map.events[@event_id].x
$game_map.events[@event_id].y
Oh yes, that is the event scripty command for THIS events x and y co-ordinates :haha: