Hello! I am hoping this isn't something that is extremely complicated, but I am looking for a script that will make it so when 2 NPCs touch, one NPC's graphic will change, but I don't want the same thing to happen when the player touches the same NPC.
For instance a bus, I want it to touch an NPC and the NPC goes into the downed position, and/or switches event pages either through self switch or regular switch. I would like it to be arranged also that when the player touches the NPC, it does NOT go into the downed position.
Thank you for your help! I greatly appreciate it.
So if I put this script in my game, and the script call, it will make one NPC/event trigger another upon collision?
If I were to use my example of Bus vs. Body, in which event would I put the script call? In the bus? Or the NPC?
(This game quickly got out of control on scripts, I am hoping I don't run into compatibility issues! 🤣 )
Edit:
Sorry, its 12:21 here, and I am not a script wizard to begin with. Thank you for your help!
Ok, one more noob question: What I am looking for is when an event touches another event, I want it to trigger a self-switch on one or the other event. If a player touches the same event, I want nothing to happen. Will this script provide different behaviors for when my player touches the event vs an event?
if that's the case, you don't really need a script for that.
what you need is a simple game variable/switch and a conditional branch in the page to do the trick.
the event(bus) using the "spot" should do the trigger along with a game variable change or flip a switch before doing the script call to start the downed npc so the triggered event will run the commands.
when directly triggering it using the game player, the game variable and switch isn't there so it will simply ignore the player and do nothing.
I'm sorry if I am dense, but I don't follow. What "Spot"? I am going to have moving obstacles, I want the bus to deal damage to the player, and down any other NPC sprite that collides with it. But I don't want the sprite to be active on player collision.
I hope I don't seem ingrateful, I really appreciate your help on the matter!
Lol, I bookmarked that Line of Sight tutorial, I will have to get into that tomorrow. I am using Falcao's Liquid Pearl ABS v3.0 and I was going to have automobiles damage the player and "down" NPCs when they were touched. Then have the NPCs react differently as enemies and die to the players weapon, or instantly downed by a bus/automobile.
if you are already using an ABS, then it should already provide you a way to check for event-event collision.
simply do that self switch script call when events are colliding.
Or make your bus a projectile that won't perish. so it will be hitting everything in it's path.
i am not sure if falcao abs allow the creation of neutral(3rd battle party) bullets, but it's worth trying.
hehehe, I have no idea, either, on where to even begin. I don't know very much about scripting, but it seems to be that the projectiles are Skills called via a script call. I will contact the Script's author and see if he is not too busy. Thank you again for your help.
Edit:
haha, I am thinking I could have an invisible event summon the automobile skill?
event-to-event triggers are a lot more difficult to handle than you think, which is why most such interaction is on command only - which is only possible if you know in advance that two events will interact at a specific time and place.
That start-event-command is also a command to start now, it does not wait.
If you want event-to-event triggers, you basically have to check the position of all involved events and trigger if they are in a position that they're touching each other.
And that will cost a lot of processing power, which is why it's usually done for a limited number of events with parallel processes only.
There is another way to enable such a collision check, but that other way would require big changes in the data structure for the maps and still require more processing power than is used now - which is why I haven't seen any implementation of it in any RM game. It's simply a lot of work to rewrite that.
Oh man! Thank you! I am going to try this out now... Fingers crossed that I don't break any compatibility and lag is minimal! Thank you again, I will let you know how it works in about 5 mins or less!
WOW! Preliminary testing reveals this script to be AWESOME! I can not begin to tell you how happy I am about this! This opens up a whole new dimension of game design. Incredible! Just incredible! I might have to put a demo up of my game sooner than later, I am impressed! I wish I could give you more than gratitude, but all I can offer is some time playtesting your game or giving feedback. Got a link?