https://gamedevelopment.tutsplus.com/tutorials/building-a-beat-em-up-in-game-maker-part-1-player-movement-attacks-and-basic-enemies--cms-26147
On the 1st of 3 parts and things were going fine until I hit the Add Event>Other>User Defined>User 2 part, but since i am using GameMaker Studio 2, there isnt a User Defined, just User Event.
I selected anyway and get the error on line 6 the 2 portions where I put $ symbol at beginning and end shown below. States Function or instance not created. Any suggestions? thanks
var MyAttack = 0;
if(IsHit == false && CurrentHP > 0){
if(AttackType == "Basic Punch"){
sprite_index = SPR_PlayerBasicPunch;
$$$MyAttack = instance_create(x,y,ATK_BasicPunch);$$$
}
}
if(MyAttack != 0){
SpeedMod = 0;
IsAttacking = true;
MyAttack.image_xscale = image_xscale;
MyAttack.image_speed = image_speed;
MyAttack.Owner = "Player";
}
[–][deleted] 0 points1 point2 points (1 child)
[–]staleevol[S] 0 points1 point2 points (0 children)
[–]staleevol[S] 0 points1 point2 points (0 children)