SamSuka
shaunjs
shaunjs

patreon


[Early Access] Weapons Tutorial

It's a long one! I decided to cover a complete solution for weapons and picking them up and firing them using a modular ds_map system.

This will be public next Friday, I've got a cute little timelapse to put up later today as well, which I won't announce here to spare your inboxes. I also opted in that particular video to not do the voice credits as it doesn't really fit that video (which otherwise has no voice-over and is really short and daft anyway).

This video is completely ad-free to celebrate hitting my $1k milestone! Even if we drop back below that, my intention is that this video will be ad free forever.

I haven't put the source code together for release with this yet, that'll likely come on Monday, along with further updates in general as per usual.

Enjoy! 

Note for new patrons: I add names to credits for videos on a monthly basis to account for the actual pledge payment. In other words, you'll need to wait until you've paid at least once to see yourself in the credits.

EditPS: I may have leaked this to the $1 crew as well by mistake when I first posted it, but hey, it happens, so I'll leave it that way this once. Consider it a teaser ;)


[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 :)

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.

Raeldor


More Creators