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.

hello.. a problem with veriables

yutu

Member

hello,
this is the problem:
i want that every time i will touch at some event when im at some state, the  variable "chukumuko" will be diminished at 10.
i did somthing like that:

event triger - event touch
chukumuko  variable = 50
if player state = WOW
chukumuko =-10
if chukumuko <= 0
show text "adsfgadsfdasf"
 

Redman

Sponsor

This could be the problem:
event triger - event touch
chukumuko  variable = 50
if player state = WOW
chukumuko =-10
if chukumuko <= 0
show text "adsfgadsfdasf"

When you have this quote in the event than your variable will always be
resetted to 50 when your character touches it. I would simply take another
event which trigger should be set to autorun:

Event001

Trigger: Autorun

@>Control Variables: [000X: Chukumuku] = 50
@>Control Self Switch: A = On

(And another page that should be activated when this self switch is "ON". Trigger can be anything except autorun and parallel process).


And I would take another sequence:

Event002
(This is your touch-event)
Trigger - Player Touch

@>Conditional Branch: [Player] is [WOW] inflicted
  @>Conditional Branch: Variable [000X: Chukumuku] <= 10
      @>Text: Blahblahblah
      @>
  :  Else
      @>Control Variables: [000X: Chukumuku] -= 10
      @>
  : Branch End
: Branch End

I hope this will help
 

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