Please Help I Need Someone to look at a script

Themexicanspider

Villager
Member
Joined
Jan 2, 2015
Messages
7
Reaction score
0
First Language
english
Primarily Uses
  I was previously using RPG maker 2k3 and i had a common event for a health bar on it. It worked fine for the project I was working on. Then I got VX Ace and I wanted to use the same common event. I had to change some minor things to it considering VX Ace does not have some of the tools 2k3 had. But i have been tinkering with it and i cant get it to work at all. Could some one please look at it and tell me where I am possibly going wrong? Thank you

This is the common events I used in 2k3:

Variable Oper: [0001:TedyHealth] Set, 5

Change HP: Lauren's Hp V[0001] Recovered

Branch is Var [0001:TedyHealth] is 5 or more

  Show Picture:1, Health 5_Main, (28)42

  Jump to Label: 1

: End

Branch is Var [0001:TedyHealth] is 4

  Show Picture:1, Health 4_Main, (28)42

  Jump to Label: 1

: End

Branch is Var [0001:TedyHealth] is 3

  Show Picture:1, Health 3_Main, (28)42

  Jump to Label: 1

: End

Branch is Var [0001:TedyHealth] is 2

  Show Picture:1, Health 2_Main, (28)42

  Jump to Label: 1

: End

Branch is Var [0001:TedyHealth] is 1

  Show Picture:1, Health 4_Main, (28)42

  Jump to Label: 1

: End

 

And the Damage Common Event:

 

Branch if Timer is 0M 02S Less/Equal

  Play Sound: Bite

  Flash Sprite: Hero, 1.0 Sec

  Variable Oper: [0001:TedyHealth] -, 1

  Timer 1 Operation: Set, 0M 03S

  Timer 1 Operation: Start

  

  Else Handler

 

  End


And here is my VX Ace port that I am not sure what I did wrong. Btw these events are being Called.

Control Variables [0001: Rose Var] = 12

Conditional Branch: Variable [0001:Rose Var] == 12

  Erase picture: 1

  Show Picture :1, Rose Health 120%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

 : Branch End

Conditional Branch: Variable [0001:Rose Var] == 11

  Erase picture: 1

  Show Picture :1, Rose Health 110%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

 : Branch End

Conditional Branch: Variable [0001:Rose Var] == 10

  Erase picture: 1

  Show Picture :1, Rose Health 100%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] == 9

  Erase picture: 1

  Show Picture :1, Rose Health 90%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] == 8

  Erase picture: 1

  Show Picture :1, Rose Health 80%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] == 7

  Erase picture: 1

  Show Picture :1, Rose Health 70%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] == 6

  Erase picture: 1

  Show Picture :1, Rose Health 60%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] == 5

  Erase picture: 1

  Show Picture :1, Rose Health 50%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] == 4

  Erase picture: 1

  Show Picture :1, Rose Health 40%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] == 3

  Erase picture: 1

  Show Picture :1, Rose Health 30%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] == 2

  Erase picture: 1

  Show Picture :1, Rose Health 20%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] == 1

  Erase picture: 1

  Show Picture :1, Rose Health 10%, Upper Left (0,0), (100%,100%), 255, Normal

  Jump to Label: 1

: Branch End

Conditional Branch: Variable [0001:Rose Var] <= 0

  Erase picture: 1

  Game Over

  Jump to Label: 1

: Branch End

Label: 1

And the Damage Common Event:

Conditional Branch: Timer 0 min 2 sec or less

  Play SE: 'Bite', 80, 100

  Control Variables: [0001:Rose var] -= 1

  Control Timer: Startup 0 min. 3 sec.)

: Branch End
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
This is not a script. It is an event. Please take care not to get the terms mixed up, as they mean very different things in RPG Maker.
 

Nirwanda

Procrastimancer
Veteran
Joined
Nov 2, 2012
Messages
1,285
Reaction score
604
First Language
Spanish
Primarily Uses
RMMV
I don't know about it's 2k3 version, but just from reading it, the Ace common event looks perfectly fine, if a little confusing (why are you constantly jumping to label? What's the timer for? Some sort of invincibility time?)

Screenshots of the common event and the event caling it or, preferably, a small demo might improve the chances of pinpointing the problem.
 
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
The Jump to Label is there to stop it processing all the other tests once it's found a condition it's met.


Where do you start the timer?


What's the trigger on the second common event? How do you call it?


I agree, screenshots would be good. I don't really see anything wrong with it either, so am suspecting it might be either something with the timer, or something about the way it's being called.
 

Sarlecc

Veteran
Veteran
Joined
Sep 16, 2012
Messages
453
Reaction score
211
First Language
English
Primarily Uses
RMMV
Can't remember but don't you have to have a timer running in order for a condition to test it? (if that is the case the only timer I see that is created is the one inside a conditional statement checking for a timer which will mean that it will never be true). So I agree with Shaz the timer is really the only thing I can think of (if my what I am thinking is true).

Edit: Yea just tested it conditionals checking for time left on a timer will only run if there is a timer outside of the conditional statement.
 
Last edited by a moderator:

Themexicanspider

Villager
Member
Joined
Jan 2, 2015
Messages
7
Reaction score
0
First Language
english
Primarily Uses
WOW! thank you so much for all the replies! so much!

The timers are for invincibility yes. I hate games that don't have those few seconds of invincibility. its so frustrating  B)

I'm a little bit of a noob with the technical terms so i'm going to just ask you a question. Are you saying that I should have the timer on a event not within the common events page? Like say on the enemies that will attack? I had the event called in 2k3 when the enemy make contact with your characters sprite. So, I did the same thing in VX Ace. If you would like, I will post a copy of the game file its self. Other wise, for a screenshot I don't know if it would work out very well. The main problem is that the picture that is indicating the players health will not change not will the var change at all. Is dropbox okay or would another site be recommended? 
 

Sarlecc

Veteran
Veteran
Joined
Sep 16, 2012
Messages
453
Reaction score
211
First Language
English
Primarily Uses
RMMV
Okay in your common event you have:

Conditional Branch: Timer 0 min 2 sec or less #Note that unless you have a timer created elsewhere this condition can never be true thus the variable #never changes. You may be able to have the timer started above this conditional statement though (not quite certain as I don't use them very often).

  Play SE: 'Bite', 80, 100

  Control Variables: [0001:Rose var] -= 1

  Control Timer: Startup 0 min. 3 sec.)

: Branch End

Also note that in order for this common event to run at all you need to call it some how. This means you either have to say run common event in another event, or set a switch to true with the common event set to parallel process.

From what I see from your event this timer would not perform invincibility but instead subtract an amount from the health bar (looks like -10% every time you decrease the variable judging from your picture names). (depending on how it gets called to though)

Edit: Wait think I see what you are talking about for invincibility.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,367
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
I had the event called in 2k3 when the enemy make contact with your characters sprite. So, I did the same thing in VX Ace.


Other wise, for a screenshot I don't know if it would work out very well. The main problem is that the picture that is indicating the players health will not change not will the var change at all.
That might be the problem - how exactly have you call the event? That is what you never showed/described, and why we asked for a screenshot.
And by that we mean a screenshot of the event pages, NOT an ingame screenshot - because in the screenshot we can see the rest of the event instead of only the content part you typed above. Events behave differently depending on how you set the triggers, how you set the priority and so on.
 

Themexicanspider

Villager
Member
Joined
Jan 2, 2015
Messages
7
Reaction score
0
First Language
english
Primarily Uses
I have some shots of the common events. sorry if they are sloppy.

For using the events, i have just used the call common event under flow control. I have also tried to use a script for calling common events but I try to only use events and such considering my scripting is not very great. I understand though that using scripts would be probably more efficient.

Shot 1.png

Shot 2.png

Shot 3.png
 

Stapleton

Underground
Veteran
Joined
May 23, 2014
Messages
212
Reaction score
112
First Language
Gaeilge
Primarily Uses
N/A
Well to start, no matter what the event on the way left is constantly calling the Variable to equal 12 so it will never change from 12.

You are going to need to change that or take it out completely, ( The Control Variable at the top).

Or put the Label 1 Right after it but before your conditional branches.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

People3_5 and People3_8 added!

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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.

Forum statistics

Threads
105,868
Messages
1,017,085
Members
137,583
Latest member
write2dgray
Top