Is there a jump scare steps script?

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I mean where's the event that does it? or did you made a script that does the addition part?

and also please answer the first question:

What actually happens? it stays at 100? becomes larger than 100?
we need to know exactly what do you mean by not resetting to zero... because as as my question implies, there are these possibilities so you need to tell us which one is happening right now...
 
Last edited by a moderator:

derpderp

Blake
Veteran
Joined
Aug 21, 2013
Messages
61
Reaction score
0
First Language
English
Primarily Uses
it becomes larger than 100

o.PNG

Is the event that counts your steps
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
I see... The STEPS I believe refer to the TOTAL number of steps you made in your game, and since your variable is set to STEPS, it will always be equal to that...

A good way to prevent this is to find the script part that sets the STEP count, and do your variable set-up there... increasing your variable by 1 everytime that method is run
 
Last edited by a moderator:

Faerypixel25

Where's Charles Lee!?
Veteran
Joined
Jul 18, 2013
Messages
233
Reaction score
20
First Language
English
Primarily Uses
Is this about that jumpscare-monster thing that you were talking to Shaz about? When ever you step so many steps the variable is going to activate an event. When that event is over, you want it to reset the variable you contain to zero? Is that what you are trying to do?
 

Faerypixel25

Where's Charles Lee!?
Veteran
Joined
Jul 18, 2013
Messages
233
Reaction score
20
First Language
English
Primarily Uses
Are you trying to reset the variable that the CHARACTER has obtained, or the variable of the EVENT?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
^ don't double post...

He's trying to reset the variable [which actually happens], but since he actually sets it almost instantly to the value that the game counts which is never reset, it makes it look like his variable doesn't reset too...

try this: (remove the event that increases the variable then create a new script and add this)

class Game_Party < Game_Unit

  def increase_steps

    @steps += 1

    $game_variables[1] += 1

  end

end
 
Last edited by a moderator:

derpderp

Blake
Veteran
Joined
Aug 21, 2013
Messages
61
Reaction score
0
First Language
English
Primarily Uses
I want to reset the amount of players steps
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Look at my above post, doing that would make your variable reset correctly (because the variable that you made will now be independent of the game's step count)

be sure to delete the event which sets your step variable to the step count of the game...
 
Last edited by a moderator:

Faerypixel25

Where's Charles Lee!?
Veteran
Joined
Jul 18, 2013
Messages
233
Reaction score
20
First Language
English
Primarily Uses
Thanks for clarification. I don't think you can actually reset the step count (that might require some scripting.) Let me see. I am currently in the Window_Steps class and the Game _variables class. I may be able to tamper with my scripting a bit to find a way to reset the step count when a certain number of variables has been recieved. (This may take a while)
 

derpderp

Blake
Veteran
Joined
Aug 21, 2013
Messages
61
Reaction score
0
First Language
English
Primarily Uses
Look at my above post, doing that would make your variable reset correctly (because the variable that you made will now be independent of the game's step count)

be sure to delete the event which sets your step variable to the step count of the game...
Do I make a script in materials or one in an event?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Of course it's going to become larger, because you're resetting it to 0, then immediately setting it back to steps again. You need to stop and think about the logic here - what you're telling it to do, in all those parallel process events you're running on top of one another (in this case, two of them are conflicting - one is saying to do one thing, and another is immediately telling it to do something different).

Try this way ...

Get rid of EV004 (let me guess - that's another parallel process event that you're running on the same map?). Just delete it. And if you have another parallel process event that's putting the player's X and Y position into those other two variables on every frame, get rid of that as well. It will not surprise me at all if you end up with severe lag in your game - you just don't seem to want to understand how to use parallel process and autorun events efficiently, or the problems you'll run into by having so many of them running at once.

In your monster parallel process event, put these commands (I'm going to add some script calls, just to avoid very long conditional branches). Don't try and combine them with anything you already have - just replace everything you've got with what's below:

Control Variables [0001: Steps] = StepsControl Variables [0001: Steps] %= 100 (that's mod 100)Conditional Branch: Variable [0001: Steps] == 0 If Switch [0001: Scare] == OFF Control Switches [0001: Scare] = ON Control Variables [0002: X] = Player's X Position Control Variables [0003: Y] = Player's Y Position Call Script: case ($game_player.direction) when 2: $game_variables[3] += 1 when 4: $game_variables[2] -= 1 when 6: $game_variables[2] += 1 when 8: $game_variables[3] -= 1 end $game_map.events[@event_id].direction = 10 - $game_player.direction Set Event Location: This event, Variable[0002][0003] Play SE: 'Shock', 100, 100 Wait 60 frames Set Event Location: This event (99,0) Branch EndElse Control Switches [0001: Scare] = OFFBranch EndWait 5 FramesWhat's happening here is that the parallel process is continually checking to see if the total steps taken is divisible by 100. Every 100 steps, it will be, so variable 1 will be 0 (no remainder after dividing by 100).When that happens, it'll put the player's X and Y into the variables. The Call Script will reset the coordinates to one tile away from the player, in whatever direction the player is facing, and will make the event face towards the player.

Then it'll move the event to stand in front of the player, facing the player, play the SE, wait a second, and move it out of the way again.

Now, there's also got to be something that stops it from repeating until the player actually starts walking again (otherwise, since the player isn't moving, it will keep saying 100 steps have been taken). That's where the switch and the stuff in the Else comes into play.

@Faerypixel25, he already asked about resetting player steps. I told him to use variables instead, because OTHER things rely on character steps, and if you actually do reset them, you're risking messing up other things that use it.

@derpderp, please stop posting multiple posts about the same problem. It's frustrating for people trying to help you, when you're asking the same thing in several different places - they'll all go in different directions, you'll get different advice, and people won't know WHAT has been suggested to you. Somebody not answering within 5 minutes is not a reason to bump your thread or to create a new one. Your question will be answered when people have the time and the knowledge to answer it.

merging threads
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Make a script in materials, because the one I posted is meant to replace the way that the game handles the step_increase...
 

Faerypixel25

Where's Charles Lee!?
Veteran
Joined
Jul 18, 2013
Messages
233
Reaction score
20
First Language
English
Primarily Uses
Wow, you just made it sound so easy, Shaz! You are a genius!
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
which one? the one I made or the one by Shaz?

btw, mine was made in such a way that you can use the variable in any other map or event in case you want different types of events to use the steps part...

If ur only using it for a single event, might as well just use Shaz' event
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
No, yours would work as well and is easier to implement. I was just trying to avoid a script mod in this particular case.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Easier to implement... well yeah... though if he's only using it in only one event and only one map, yours will be what I suggest so that he's not having any unnecessary processing; it's most probably not noticeable though... XD

PS: and I'm one who is more keen into scripts than events... I always liked typing things better than clicking... 
 
Last edited by a moderator:

derpderp

Blake
Veteran
Joined
Aug 21, 2013
Messages
61
Reaction score
0
First Language
English
Primarily Uses
Of course it's going to become larger, because you're resetting it to 0, then immediately setting it back to steps again. You need to stop and think about the logic here - what you're telling it to do, in all those parallel process events you're running on top of one another (in this case, two of them are conflicting - one is saying to do one thing, and another is immediately telling it to do something different).

Try this way ...

Get rid of EV004 (let me guess - that's another parallel process event that you're running on the same map?). Just delete it. And if you have another parallel process event that's putting the player's X and Y position into those other two variables on every frame, get rid of that as well. It will not surprise me at all if you end up with severe lag in your game - you just don't seem to want to understand how to use parallel process and autorun events efficiently, or the problems you'll run into by having so many of them running at once.

In your monster parallel process event, put these commands (I'm going to add some script calls, just to avoid very long conditional branches). Don't try and combine them with anything you already have - just replace everything you've got with what's below:

Control Variables [0001: Steps] = StepsControl Variables [0001: Steps] %= 100 (that's mod 100)Conditional Branch: Variable [0001: Steps] == 0 If Switch [0001: Scare] == OFF Control Switches [0001: Scare] = ON Control Variables [0002: X] = Player's X Position Control Variables [0003: Y] = Player's Y Position Call Script: case ($game_player.direction) when 2: $game_variables[3] += 1 when 4: $game_variables[2] -= 1 when 6: $game_variables[2] += 1 when 8: $game_variables[3] -= 1 end $game_map.events[@event_id].direction = 10 - $game_player.direction Set Event Location: This event, Variable[0002][0003] Play SE: 'Shock', 100, 100 Wait 60 frames Set Event Location: This event (99,0) Branch EndElse Control Switches [0001: Scare] = OFFBranch EndWait 5 FramesWhat's happening here is that the parallel process is continually checking to see if the total steps taken is divisible by 100. Every 100 steps, it will be, so variable 1 will be 0 (no remainder after dividing by 100).When that happens, it'll put the player's X and Y into the variables. The Call Script will reset the coordinates to one tile away from the player, in whatever direction the player is facing, and will make the event face towards the player.

Then it'll move the event to stand in front of the player, facing the player, play the SE, wait a second, and move it out of the way again.

Now, there's also got to be something that stops it from repeating until the player actually starts walking again (otherwise, since the player isn't moving, it will keep saying 100 steps have been taken). That's where the switch and the stuff in the Else comes into play.

@Faerypixel25, he already asked about resetting player steps. I told him to use variables instead, because OTHER things rely on character steps, and if you actually do reset them, you're risking messing up other things that use it.

@derpderp, please stop posting multiple posts about the same problem. It's frustrating for people trying to help you, when you're asking the same thing in several different places - they'll all go in different directions, you'll get different advice, and people won't know WHAT has been suggested to you. Somebody not answering within 5 minutes is not a reason to bump your thread or to create a new one. Your question will be answered when people have the time and the knowledge to answer it.

merging threads
I don't have a switch called Scare, where do I have it and stuff?
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Create it. Use whatever new switch id is available, and change what I said above to use your new switch instead of switch 1.
 

derpderp

Blake
Veteran
Joined
Aug 21, 2013
Messages
61
Reaction score
0
First Language
English
Primarily Uses
So do I need to put it as any conditions?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

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,860
Messages
1,017,040
Members
137,569
Latest member
Shtelsky
Top