RunFaps
shaunjs
shaunjs patreon

[Early Access] Weapons Tutorial

🕑 Added 2018-01-19 19:04:00 +0000 UTC
[Early Access] Weapons Tutorial

Comments

Without remembering the whole context/content of this tutorial, I'd say you have to loop through your weapons in order starting from wherever you are until you find one that is "available" be that it has positive ammo or is flagged as active somehow (maybe as one of the weapon's attributes?) and then ChangeWeapon to that value.

Hey Sean, excuse me if this post is dead but was wondering if you could point me in the direction of some help. i have the weapons working in my platformer and you can individually select weapons after you have them (they all have infinite ammo atm) but im limited by the button on the controller. I was wondering how i could just go to the next available weapon instead of what i have below. when you pick up a weapon currently i save it under a persistent oMaincontrols object so it carried over into the next room i,e HasARG, HasBlaster etc so i can tell easily if i have it or not. if keyboard_check_pressed(ord("1")) || gamepad_button_check(0,gp_shoulderl) with (oWeapon) { ChangeWeapon(0); } if (keyboard_check_pressed(ord("2")) || gamepad_button_check(0,gp_shoulderr)) && (HasARG = true) with (oWeapon) { ChangeWeapon(1); } if (keyboard_check_pressed(ord("3")) || gamepad_button_check(0,gp_shoulderrb)) && (HasBlaster = true) with (oWeapon) { ChangeWeapon(2); } sorry im new and i dnt get the ds map system properly yet.

It'll be in the source download when I get it up :)

Raeldor

Now I'm curious about how to make hitscan projectiles. I was hoping that at the end of the video you would explain it. :P Also I don't know why my weapon doesn't seem shoot bullets, the rest of the properties work fine. Edit: I found it, Looks like the ammo was going to 0 when a weapon was picked up.


More Creators