Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Talking to a walking NPC without the NPC facing to your direction

Twirly

Sponsor

So I evented a sneaking system and everything worked fine.
After I have done that, I wanted to enable a backstab feature for it.
Which means when the guard is facing up and I am facing up it should show
some slash animation on the guard and trigger a selfswitch which turns the graphic of the guard in a charset of a guard lying
dead/unsonsious on the floor. If the Guard isn't facing down  check if he is facing left and i am facing left and the same thing again
untill I have all directions. BUT when I talk to the NPC he is facing in my direction again and it won't work...
Does anybody know how to fix that? I could make direction fix but the Npc is walking so it won't work with that.
 
People here seem to have really good ideas.
I'll explain what he meant:
1: Change the trigger thingy from action button to player touch
2: Before all of the W\E you put in that event starts, put a conditional branch-
the W\E key is being pressed :do the event
   else: nothing
 
Wow xp sucks in this regard.  The above works fine in vx.  But xp still does the face you thing.  However in xp it wont face you if you do it as a parallel process.  This is wasteful of resources and if you are using text you will need your trigger button to be something other than the action button.  Cause every press of action will make the parallel process execute unless you have an out of some sort via a nested conditional.  Here is one example where vx is actually cleaner than xp as far as event coding is concerned.
 
I'm using XP and haven't tried this yet, but here's my idea.  First calculate if the event has seen you.  If not, you could always bump the event back by saying something along the lines of ignore impossible moves, step away from hero.  Just before that, put in the animation.  Then change the event to the downed position.  The only problem here is there's no way to calculate a true backstab here because with this method you could theoretically do it if you went from the side as well.
 

Twirly

Sponsor

Well it doesn't matter now It was for my evented stealth system and I upgraded the stealth system so the guard can be only touched or action buttoned from behind...
BTW try my system it is in my sig :D (Surreptitious advertising FTW hehe)
But actually thanks for trying to help me out ;)
 

Tindy

Sponsor

Got it.  Here's what you do:

For the guard, make one page where his Autonomous movement is either set to random or to a custom move-route.  On that page, make a conditional branch: If This Event is facing Up, then: Control Self-Switch A=ON.  Make the trigger by Player Touch.  On the next page, set it to Direction Fix, and have the trigger be Action Button:  Put whatever you want to have happen (I just did Show Animation and Delete Event).  When I did it, it worked like a dream.

EDIT: Oh crap, I didn't realise this was for VX.  It *should* work, though, hopefully.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top