Suggestions for an easier way for event damage?

Dragnfly

Veteran
Veteran
Joined
Feb 13, 2015
Messages
160
Reaction score
70
First Language
English
Primarily Uses
First, some context:
-Normally the game uses roaming encounters for dungeons but in this scene there are no battles, roaming or random.
-The characters have a time limit to reach the top of the building (dungeon).
-Outside, an aircraft is shooting at them at certain points (when they pass by windows, holes in the wall, etc). This is NOT a battle. I want the damage to come straight off them like a damage tile.
-Since this happens at nighttime I want to use a searchlight coming in from the outside to signify when the aircraft is there or gone and when it's safe/unsafe to pass.

I've been mulling over a few ways to do this but I can't help but feel that I'm making it far harder on myself than I need to.

Currently I have what I think is a very awkward method. I replaced an NPC's sprite with the searchlight and gave it a movement pattern to move in and out of view, and trigger damage on touch. This looks really weird and I'm sure there's an easier way.

Note: I'm still on new account probation so if you reply and I don't answer that's because I have to wait until tomorrow. Thanks.
 

Malstrom

Villager
Member
Joined
Feb 12, 2015
Messages
8
Reaction score
1
First Language
Spanish
Primarily Uses
I may have an idea, but I'm not sure I fully understand how do you picture it in your mind.

So, I made this example in which the player needs to go through the room. However, if the upper character is looking down and the player is in the same X position, he damages him and makes him step back:

img3.png

And I made it this way:

- First, create a sprite with the animation of the searchlight turning on and off. Place it in the directions up, down, left and right. This is what you should do, but I used a simple soldier instead, sorry.

- Second, place the hole or window as a parallel process event and set a move route in which the event looks at each direction a certain amount of frames, This would play the animation of the searchlight turning on and off constantly.

img1.PNG

- Third, for the content of this event we are going to need two conditional branches to represent two conditions:

a) The player is placed in the line of sight of the searchlight. In my example, the soldier is placed in the upper wall, so if he shares the same X position with the player this condition should be met. I put this script in the branch:

$game_map.events[@event_id].x == $game_player.x

b ) The searchlight is ON, which for us that means that the event is looking in a specific direction. I chose the 'looking down' sprite for the example:

The event is facing down

If the conditions a) and b ) meet, you can add an animation, put damage, etc

It should look like this:

img2.PNG

I hope I helped a little bit. You could apply this process to different locations and directions, as well for different switching times.
 
Last edited by a moderator:

Dragnfly

Veteran
Veteran
Joined
Feb 13, 2015
Messages
160
Reaction score
70
First Language
English
Primarily Uses
... Wow. That's significantly better than how I was doing it. I didn't know you could set it to look for line of sight without a script like Yanfly's Event Chase Player. I had to rely on narrow hallways my way but with yours I can afford to have larger hallways and larger wall breaches.

Actually, I can even put event switches at certain intervals in the hallway so that once you pass one danger zone it can play a "helicopter flying away" sound, turn off that searchlight and activate the next one to make it seem like the aircraft is moving to the next location instead of there being a bunch of them outside (there's only one and it's very, very mean"

Thanks. I do pretty well for myself considering I really struggle with programming and scripting and stuff. It's just not my strong point. But I do have the tendency to go in the completely wrong direction and make things much harder than they need to be. It's why this project has changed mediums so much and has been delayed for a decade and a half.

Thank you, seriously. Thank you.
 

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,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top