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.

how do i use a weapons on events

i wanna use a bow to shoot a switch on the other side of a river, that will lower a bridge

how do i apply this without useing a script and if i need a script is it an easy copy and paste into the date system?
please help
 
There is a number of ways you can do this. How do you want to use the bow?

Do you want to use bow as a key item and shoot from a specific spot?
Or as a tool that you can shoot from anywhere with a touch of a button?
 
both ways would help me alot but i would like to no more about the
shoot anywhere with a push of a button.

that would work well if my hunting and gathering part in my game. (gotta kill a deer for food)
right now im useing a conditional branch. ''if sword is in player inventory'' u are then able to cut down weeds with a simple click of the enter button.

i want to be able to see the bow arrow fly through the air and hit an animal for damage

i dont like useing the ingame battle system rpg style, i want to be able to avoid battle and see the enemy before
a battle starts

thanks for your reply
 
I made this event system. Hopeful you can deconstruct how it works yourself.
It involves switches, variables, event pages

http://www.mediafire.com/?6ruozik3d0da615

Basically you have a parallel process event that turns into an arrow when switch 'tool' is on and moves to the players position and moves however far before turning off.

The target event goes to a new event page while 'tool' is on. It stores it's map x & y location, and the arrows map x&y in variables. Then useing a conditional branch it preforms an action when both sets of x&y locations are the same
 
i dunno why but my comp is not letting me download that file

its saying a threat was found.. i'll figure it out how to download it i gotta work around my Norton
i'll get back to u once i figure it out

ty very much
 
Attack how?
You could have the event move "towards the player" with a "event touch" trigger that does damage.

Shooting the player back is a little tricky. You don't want a bunch of events running parallel process constantly storing a dozen x & y variables because that would cause some lag. This is where scripting would come in handy.

Edit: I'm put something together to show you.
 
http://www.mediafire.com/?x3ntodcbx8onaxc

Instead of looking up positions, storing them in variables, then comparing the variables. Its easier just to compare the positions all at once with a script. The problem is you have to understand Ruby language in the first place, and then you have to study the rgss so you know what to reference.

The player's position is:
$game_player.x , $game_player.y

A event's position is:
$game_map.events[id].x , $game_map.events[id].y
(id is event's id number list at the top of the event window)

You can make a conditional branch with script selected and type:
$game_player.x == $game_map.events[id].x
to compare the player's x and the event's x without storing them in variables.

You can also use .moveto(x,y) to move an event to a new spot. In this case, the iceball is event #5, and I want to move to start at the player's location. So the script would look like this:

x = $game_player.x
y = $game_player.y
$game_map.events[5].moveto(x ,y)

In the Demo there is an enemy that'll throw a fire ball at you when you are in his line of sight. Technically, when you are on either his x or y axis, and he is facing you. This involves 3 conditional branches. Lets say he is facing down, then you would need to have the same X coordinate and his Y coordinate would have to be greater then yours. So you would nest three branches like this:

conditional branch: if event is facing down
>conditional branch: if $game_map.events[whateverID].x == $game_player.x
>>conditional branch: if $game_map.events[whateverID].y >= $game_player.y
>>> throw Fireball

I tired documenting the event pages with comments because you have to scroll through a lot conditional branches. It looks like a lot of work but its mostly just copy and paste with a small change.
 

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