Directional Facing Enemy Challenge (SOLVED)

EliteFerrex

Veteran
Veteran
Joined
Oct 26, 2015
Messages
43
Reaction score
14
First Language
English
Primarily Uses
I have a question about trying to make a little challenge for a room in a dungeon.


I have an orc who sits in the middle of the room, looking up and down, trying to spot the player as he/she hops by. (See image below)Map163.png


If the player is standing on the spaces above or below the Orc when he looks that direction, an event triggers that jumps them into the lava (because the Orc throws a rock at them), adn then sends them back to the starting point of the room. However, if the player is already on the square and the event has not triggered (because the Orc is looking the other way), if the Orc THEN looks at the player (while he/she is already standing on the space), the event will not activate.


Is there a way to get the event to trigger anytime the Orc looks in that direction, as opposed to only when the player first steps on the square?


Thanks in advance, everyone!
 
Last edited by a moderator:

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
you need to check Orc direction


$gameMap.event(x).direction()


x for orc event's ID


and the direction is  in your keypad numbers
 
Last edited by a moderator:

EliteFerrex

Veteran
Veteran
Joined
Oct 26, 2015
Messages
43
Reaction score
14
First Language
English
Primarily Uses
Won't that effectively do the same thing, though?


If I check the Orc's direction when the player first steps on the platform, I'm sure it would work. But what about when the player is already there and he turns to face them again? The event that he/she is standing on won't automatically re-trigger, will it?
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
how about the trigger is Parallel??!
 

EliteFerrex

Veteran
Veteran
Joined
Oct 26, 2015
Messages
43
Reaction score
14
First Language
English
Primarily Uses
Parallel will make the event automatically run itself constantly, including the animations and everything. I tried that one, too. :c
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
you can make another event check your place and the direction of the Orc 


and trigger Orc's event with switch
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
you can make another event check your place and the direction of the Orc 


and trigger Orc's event with switch


Can you give us screenshot for your event?!
 
Last edited by a moderator:

EliteFerrex

Veteran
Veteran
Joined
Oct 26, 2015
Messages
43
Reaction score
14
First Language
English
Primarily Uses
I ended up using a different challenge thing instead. But, I'll post the event that I had put together anyway.


This is the Orc's event.

Orc Event.png



This is a sample spaces' event. (The other event page is empty for when the Orc is not facing that way.) The other event is the same formula, just with the opposite direction for the jump, and a different location, and it's set to work when the switch is OFF instead of when it's on.

Event 1.png



Hope that helps, and thanks for trying so much. ^^
 

EliteFerrex

Veteran
Veteran
Joined
Oct 26, 2015
Messages
43
Reaction score
14
First Language
English
Primarily Uses
you can make another event check your place and the direction of the Orc 


and trigger Orc's event with switch


Can you give us screenshot for your event?!
Oh wait, so basically, just have two conditional branches to see if the Orc is facing that direction, and if the player is currently on that square using Region ID? That might work. o.o
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
I ended up using a different challenge thing instead. But, I'll post the event that I had put together anyway.


This is the Orc's event.




Hope that helps, and thanks for trying so much. ^^
you delete switches from the orc event and make conditional with player place and will enable switch for the other event 


and if else it will make switch off


and you can make the other event with switch and make it parallel 


it will enable if the switch on and the end of event make the switch off
 

EliteFerrex

Veteran
Veteran
Joined
Oct 26, 2015
Messages
43
Reaction score
14
First Language
English
Primarily Uses
you delete switches from the orc event and make conditional with player place and will enable switch for the other event 


and if else it will make switch off


and you can make the other event with switch and make it parallel 


it will enable if the switch on and the end of event make the switch off
I'm not sure what you mean by a Conditional Branch with Player place. How do I check for that?
 

EliteFerrex

Veteran
Veteran
Joined
Oct 26, 2015
Messages
43
Reaction score
14
First Language
English
Primarily Uses
Never mind, I found another post on here that game me the information I needed.


I just needed to enter Script $gameMap.regionId($gamePlayer.x, $gamePlayer.y) === n where n = the Region ID of that particular square. Apparently I ened to improve my familiarity with Script commands.


Thank you very much for your help, mrcopra!
 

mrcopra

Veteran
Veteran
Joined
Jul 21, 2015
Messages
452
Reaction score
158
First Language
Not English
Primarily Uses
N/A
Sorry forget about the place,


your way easier 


use regions
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,569
Latest member
Shtelsky
Top