varchild4

Veteran
Veteran
Joined
Nov 13, 2015
Messages
30
Reaction score
3
First Language
Francais
Primarily Uses
I repost my question cause it's been 2 weeks that it stays unanwsered: maybe something got wrong.. 

So i made a boulder and switch puzzle. With a parallel process; when the boulder is standing on the switch it opens a door. It was successful using variables to check the position of boulder (35,28) but i wanted to simplify the event cause their will be many of those. I don't want to use variables for each one.

  • I tested with player and it works. I've put this scipt in the conditional branch:        $game_player.x == 35 and $game_player.y == 28

  • But with the bouler (EVO21) it doesn't work. I've put this scipt in the conditional branch instead:         $game_map.events[021].x == 35 and $game_map.events[021].y == 28 



Do you know why? Thanks a lot  :)

Here's a sceenshot of the event: 

 

kIzSk.jpg
 
Last edited by a moderator:

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
155
First Language
English
Primarily Uses
Varchild, I remade your event and it worked fine for me. Why are you waiting 120 frames? I would do 5 frames, maybe even 1. Also, one way to test your event is to temporarily remove the switches and replace them with a show text command "switch on!" when the conditions are met which will let you debug the problem. If you see the message, that will tell you your event is actually working fine. If you don't then you know its something with your spelling or other...
 
Last edited by a moderator:

varchild4

Veteran
Veteran
Joined
Nov 13, 2015
Messages
30
Reaction score
3
First Language
Francais
Primarily Uses
Thanks Dydez.. did you realy recreated the puzzle, wow! :D Also, I managed to make it work by removing the "0" in the event call [021]. Did you use [21] or  [021] in your test?

Thanks for the hint about debugging. I was doing it the other way around, that is fine too: you tap F9 in-game to see if all the switchs and variables ON/OFF. ;)  ..in my case the switch wasn't ON.. so it was not working.. but now it's fine thanks to forum help :)
 
Last edited by a moderator:

ZServ

Veteran
Veteran
Joined
Jun 16, 2014
Messages
260
Reaction score
71
Primarily Uses
I'm sorry for posting such a stupid question, but I've been using the script call collection thread and can't quite wrap my head around the proper syntax for adjusting movement speed.

# Single ActionnewCommand.code = moveCode # See List in Game_Character Default Script newCommand.parameters = [""] # This refers to Jump, Wait, Switch On, Switch Off, Change Speed, # Change Frequency, Change Graphic, Change Opacity, Play SE and Script.newRoute.list.insert(0,newCommand.clone)So, I'm assuming the moveCode would be 29, which is the Game_Character code for movement speed. So, would I then set the parameters to be equal to whatever I want the movement speed to be?

I only ask because my default movement speed isn't 3 or 4, it's 3.5. So, after cutscenes where the player walks (presumably alongside other NPCs), I need a way of changing the speed back, which I obviously can't do through the normal move route event.
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
220
First Language
English
Primarily Uses
RMVXA
It would be easier to use something like:

Code:
$game_player.move_speed = 3.5 # for the player$game_map.events[id].move_speed = 3.5 # for events.
 
Last edited by a moderator:
Joined
Jun 5, 2013
Messages
459
Reaction score
85
First Language
English
Primarily Uses
N/A
I'm trying to make a buff that restores hp if a character has a certain accessory equipped.

This is my formula and it doesn't work so far.  a.armors.include?($data_armors[144]) ?
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,719
First Language
English
Primarily Uses
RMVXA
@BlackLiquidSorrow

I was needing to identify if a particular piece of gear had been equipped, and this is what I used:

$game_party.members.any? { |member| member.equips.include?($data_armors[12]) }

EDIT

That checks of any character has it.  If you need to see if a particular character has it (not clear from your post) I suppose the

$game_party.members.any

would become

$game_party.members.[x]

with x = the character id from the database.
 
Last edited by a moderator:

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
155
First Language
English
Primarily Uses
Hey ksjp (or whoever can answer)

a little while back you helped someone concerning a boulder puzzle and gave them the following script to check in a conditional branch

e = $game_map.events[@event_id]; e.passable?(e.x, e.y, $game_player.direction)
This was to check if the tile in front of the event was passable. Do you know if there's a check like this to see if the tile behind the actor is passable? I want to add this check for not only events that get pushed, but also pulled. thank you.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,719
First Language
English
Primarily Uses
RMVXA
@Dymdez

I'm not sure I follow this.  In order to interact with the boulder, the player will have to turn to face it, so it will cease to be 'behind' the player and will be 'in front'.

When the boulder is pulled, the player also takes a step backwards, at least that's how I set it up, so it never goes 'behind' the player, it is always in front.

Could you explain a little more the way you envisage the sequence?
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
155
First Language
English
Primarily Uses
Sure, I probably wasn't clear. Regardless of whether you're pulling or pushing, the boulder will need to be in front of the player, I agree. But when you're pushing you check to see whether the tile the boulder will be moving onto is passable (the code above). I was wondering if you knew a method to check whether the tile behind the player is passable, because when you pull the boulder (or chair, in my game) you will be moving 1 tilebackwards, as opposed to 1 tile forwards when you are pushing.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,719
First Language
English
Primarily Uses
RMVXA
I see what you mean now. I can't think of a way to do that. I think the only way to be sure that the player doesn't get stuck, ever, is to design the map so that every potential obstacle has a couple of clear tiles in at least one direction.
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
155
First Language
English
Primarily Uses
Ahh, that won't work because eventually you can back into something not passable. It's okay, I will think of something, there's always a solution, even if it requires some direction fixing and invisible turning.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,719
First Language
English
Primarily Uses
RMVXA
The way I set this up, you could only pull backwards when it wasn't possible to push forwards, so a maximum of one pull. But that was the whole event, which goes beyond the scope of a thread on script calls.
 

Dymdez

Newbie-in-Chief
Veteran
Joined
Feb 4, 2014
Messages
752
Reaction score
155
First Language
English
Primarily Uses
Hmm, so there's no way to check if the tile behind the player is passable? Is there a way to alter the following script call to look at the opposite direction, somehow? There must be a way. My plan of using direction fixes and Turn 180's didn't work as planned :p

$game_player.passable?($game_player.x,$game_player.y,$game_player.direction)nvmd solved
 
Last edited by a moderator:

EternalShadow

Veteran
Veteran
Joined
Sep 16, 2012
Messages
5,781
Reaction score
1,042
First Language
English
Primarily Uses
At the moment, I'm trying to grab some data of a player's equipped item.


Here:


Script call = $right_hand = $game_actors[1].equips[0]


Variable 1 = $right_hand.name


Text box = You are wielding an \V[1].


This works.


However, how would I change "$right_hand.name" to get me the atk/def/etc stats of the weapon? .name would be replaced by...?
 

steeltamashii

A Simple Storyteller
Veteran
Joined
Sep 12, 2013
Messages
32
Reaction score
6
First Language
English
Primarily Uses
So I'm trying to trigger an event to happen only when the timer runs out, but am having alot of trouble getting the correct script call to make it work (see attached photo for code)


Help? Thank you in advance.

Research System Timer Issue.png
 

KanaX

Just being a sleepy
Veteran
Joined
Apr 3, 2013
Messages
1,455
Reaction score
1,298
First Language
Broken English.
Primarily Uses
N/A
Unless I'm missing something really obvious, it seems like you can simply have a conditional branch command to check whenever the timer is at 0 min and 0 sec or less.
 

steeltamashii

A Simple Storyteller
Veteran
Joined
Sep 12, 2013
Messages
32
Reaction score
6
First Language
English
Primarily Uses
Unless I'm missing something really obvious, it seems like you can simply have a conditional branch command to check whenever the timer is at 0 min and 0 sec or less.



That's what I'd like to do, I'm just looking for the correct script call to accomplish that, since the above code isn't working.
 

KanaX

Just being a sleepy
Veteran
Joined
Apr 3, 2013
Messages
1,455
Reaction score
1,298
First Language
Broken English.
Primarily Uses
N/A
ErqiQMM.png



To my understanding, it seems that you don't need any script calls. Just make sure that in a prior moment you have started a timer.
1Qaiu4W.png
 

Latest Threads

Latest Posts

Latest Profile Posts

just finished a bunch of art commissions! im really grateful for this community- people have helped me out so much here- so im just trying to return the favor the only way i know how! :0)
Ami
--- Fan Art ---

F.Mage: Phew...after finishing the Gathering Quest,i can take a break with my Phone. Let's see,what's new in the Fan Art Gallery
(3 Minutes Later,The Fan Art Of F.Healer & F.Mage Pecking Each Other Appeared)
F.Mage: (Spit The Water) WHAT THE HELL!!!
(Meanwhile)
M.Knight: (Nosebleeding) Nice Scenery!
trying to figure my way around the basic functions of Construct 3 and OH GOD MY BRAIN. I'm starting to think that developing decades of RPG Maker skills might have a downside.
I miss my VXA project, so I might be rushing for RSE. Dropping a random progress report
AeroPergold wrote on LUKElcs's profile.
Its-a me, Pergold from Gamejolt!

Forum statistics

Threads
108,817
Messages
1,039,723
Members
141,268
Latest member
Verdux
Top