Re: Tentacle-tan and the Wisp's Cure
sry 4 not having anything made yet but i've been working on the game a lot, so i want to have a complete stage to show. but
@rydin- i noticed in one of your pics you have a whole bunch of variables.
is that wat i need to make an action happen with a sprite for ex. attanking and jumping. how do i learn how to use variables like that
Its a personal preference. Normally I just use scripts for my games and dont use the little drag and drop icon thingys, but when I do, I use a ton of variables for all sorts of things. Lets use attacking as an example...
Heres what I want. When Player attacks I want the game to switch to the attack object BUT I want to make sure that the attack is facing the same way as the player was originally facing. I use variables for this. 1=true 0 =false
(Im going to do this vertically so I can explain each part)
When the [attack] button is pressed...
Pressing a button
-If Var "Dir" = 1
checks to see what direction the character is facing.
-Change Object "Run" to Object "Attack right"
It saw "1" so the character is facing the right
-If Var "Dir" = 0
-Change Object "Run" to Object "Attack left"
Your movements would have to reflect this change in direction as well
When
button is pressed
-Change Var "Dir" to 1
-Change sprite to "run right"
blah blah blah...
Simplest way to start. You can also use the "Else" function but you may confuse yourself at this point.
This is an actual example, using real scripting, from the Conta game im working on. This spawns a bullet, then checks a variable to see what way the character is facing, and then sends the bullet in the appropriate direction.
var Bul;
Bul=instance_create(x,y,obj_bullet); create a bullet
if facing=-1 { See what way the character is facing
Bul.direction=180; -1 is to the left so it turns the bullet around
} else {
Bul.direction=0; Otherwise it must be going to the right so it is unchanged
}
Bul.type=1; this just sets the "bullet type" to the players so I can differentiate what are player and enemy bullets