Jetpack/Booster 2.0 - Help!

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Loki
Posts: 17
Joined: Wed Jul 06, 2005 6:20 pm
Location: Sigil, the City of Doors

Jetpack/Booster 2.0 - Help!

Post by Loki »

I'm working on a jetpack item/ability inspired by Cave Story's Booster 2.0, for which I decided to use ACS (I want the player to be able to access this at any time via a keybind, and inventory items are not complex enough). I currently only have the vertical boost, which works remarkably well, but my attempts to limit the amount of time the player can spend in the air are not working in the slightest. Here's the code for both the KEYCONF and ACS (I'm using LOADACS to load the BOOSTER library at startup):

ACS:
Spoiler:
KEYCONF:
Spoiler:
Last edited by Loki on Mon Jul 02, 2007 5:17 pm, edited 1 time in total.
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Post by Ryan Cordell »

I used a method of counting down time by simply subtracting an actor who works as the 'timer', once the actor runs out in the player's inventory, said event starts/stops.

Try that method.
User avatar
Loki
Posts: 17
Joined: Wed Jul 06, 2005 6:20 pm
Location: Sigil, the City of Doors

Post by Loki »

Thanks, that works great.
User avatar
Loki
Posts: 17
Joined: Wed Jul 06, 2005 6:20 pm
Location: Sigil, the City of Doors

Help!

Post by Loki »

Well, I have a new problem. The upwards motion works great, but sideways not so much: It appears ThrustThing is not configured for relative motion, and always sends things to an absolute angle (i.e. press the "left" button to go west). My guess is that I'll need to create a function to compute relative thrust angles from my absolute angle. Hmmm. I hate writing functions. Any suggestions? Oh, here's the code:

ACS:
Spoiler:
And KEYCONF:
Spoiler:
User avatar
Ryan Cordell
Posts: 4349
Joined: Sun Feb 06, 2005 6:39 am
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia (Modern GZDoom)
Location: Capital of Explodistan

Post by Ryan Cordell »

What I suggest is for going left and right, is possibly bitshifting the player's current X/Y axis or his angle with >>8 or such. Not really sure on this one.
User avatar
Loki
Posts: 17
Joined: Wed Jul 06, 2005 6:20 pm
Location: Sigil, the City of Doors

Post by Loki »

Well, I have an idea that might work, assuming that byte angles are in modulo 255 (i.e. 256=0, 257=1, etc.): I could add the desired direction to the byte angle value for the player's GetActorAngle(). Here goes nothing.

EDIT: It works! Woo yay!
Locked

Return to “Editing (Archive)”