I'm using weapon as an item so it can display what weapon the player is using at the bottom of the screen. This is what my new script looks like:
Dim Weapon
Weapon = 1
Sub Player_OnControllerMove(OldActions, NewActions)
If (Not OldActions) And NewActions And ACTION_BUTTON1 Then Shoot
If (Not OldActions) And NewActions And ACTION_BUTTON2 Then SelectShot
End Sub
Sub Shoot 'Determines which type of sprite to create'
If Weapon = 1 Then DoFireButton0
If Weapon = 2 Then DoFireButton1
If Weapon = 3 Then DoFireButton2
End Sub
Sub SelectShot 'Switches between weapons'
Weapon = (Weapon + 1) Mod 4
ProjectObj.GamePlayer.InvQuantityOwned(0) = Weapon
End Sub
Anyways, I started making this game after playing Half-Life 2. I'm trying to recreate the gravity gun in gamedev. Right now, when the player shoots certain objects with the gun, a cursor appears on the screen thats lets you drag and reposition the objects with the mouse. Except for the mouse part, it's mostly done with special functions, so I'm transfering the functions into the script. (That way I won't have to redo 15 special functions for every map).