How do I Properly code if relative in Construct 2

Get help using Construct 2

Post » Wed Feb 15, 2017 7:14 pm

GML stands for Game Maker Language



I Jason know a GML version of working error free if relative such as
Code: Select all
Sarah
Create Event:
hp = 127;
hp_times_by = 1;
hp_plus = 0;
hp_minus = 0;
hp_divided_by = 1;


Step Event
if (hp_divided_by <> 1)
{
  hp /= hp_divided_by;
  hp_divided_by = 1;
}
if (hp_minus <> 0)
{
  hp -= hp_minus;
  hp_minus = 0;
}
if (hp_plus <> 0)
{
  hp += hp_plus;
  hp_plus = 0;
}
if (hp_times_by <> 1)
{
  hp *= hp_times_by;
  hp_times_by = 1;
}
if (hp_times_by = 32)
{
  x += 15;
}
if (hp_minus = 32)
{
  y -= 15;
}
if (hp_plus = 32)
{
  x -= 15;
}
if (hp_divided_by = 32)
{
  y += 15;
}
if (keyboard_check_pressed(ord("D")))
{
  hp_divided_by = 32;
}
if (keyboard_check_pressed(ord("P")))
{
  hp_plus = 32;
}
if (keyboard_check_pressed(ord("M")))
{
  hp_minus = 32;
}
if (keyboard_check_pressed(ord("T")))
{
  hp_times_by = 32;
}



In Construct 2 how would I properly code up above coding
but instead of using GML
I use the coding language of Construct 2?
Banned User
B
4
S
1
Posts: 4
Reputation: 358

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 33 guests