One of the items for my mod is going to be a module that functions as close to the Long Jump Module from Half Life as possible.
(for those unfamiliar) http://half-life.wikia.com/wiki/Long_Jump_Module
So, I decided to write an experimental ACS script to try an emulate the action but as I somewhat expected, it did not work (since I'm still not very familiar with ACS). What am I doing wrong? Here is the ACS code I came up with.
Code: Select all
#library "LJM"
#include "zcommon.acs"
//I created another script, code below, that sets the player's TID to 0. The code is directly from the Zdoom wiki.
/*
SetPlayerTID.acs
#library "SetPlayerTID"
#include "zcommon.acs"
script 1 ENTER
{
Thing_ChangeTID(0, 100+PlayerNumber());
}
*/
script 101 (void)
{
int bttns = GetPlayerInput(100, INPUT_BUTTONS);
if (CheckInventory("LongJump") == 1)
{
if (bttns & BT_SPEED && bttns & BT_JUMP)
{
ThrustThing(GetActorAngle(100)*256/360, 20, 0, 100);
ThrustThingZ(100, 10, 0, 1);
print(s:"Boost Activated"); //Used for testing purposes just to see if it even worked
}
}
else
{ print(s: "Long Jump Extension Not Found."); }
}