ascottk on 23/9/2009 at 07:07
I made some new variables :D
(
http://img188.imageshack.us/i/t3ednewvariables1.jpg/)
Inline Image:
http://img188.imageshack.us/img188/4019/t3ednewvariables1.th.jpgI copied some code into a new archetype:
Code:
class askScript1 extends askScripts;
var(askAIState) bitfield askState
{
askSTATE_Drunk,
askSTATE_Dumb,
askSTATE_Straight
} askAIState "What state am I in?";
A delayed response to NH:
I has looking at the SDK for Havok 5.5.0 (presumably this or an older version of Havok for T3) & it doesn't seem like there is specific support for water physics. Some Googling kind of confirmed that.
But cool . . . I made some variables . . . with unreal script even :joke:
ascottk on 25/9/2009 at 00:30
Just a few more notes & discoveries:
* There are quite a few hidden variables we previously didn't have access to. For example some variables in the Engine.Pawn that could come in handy for water:
Code:
VarType VaraName Desc
_______ ________ ____
Engine.Pawn
name AnimStatus
PlayerControllerState to use when moving in water
name WaterMovementState
PlayerControllerState to use when moving in water
float WaterSpeed
The maximum swimming speed.
bool bUpAndOut
used by swimming
var enum GARRETT_SPEEDS
{
GSP_SLOW,
GSP_MEDIUM,
GSP_FAST,
GSP_IDLE
} InputSpeed;
var float physicsSpeed;// actual speed of G according to physics
var int AnimToPlay;
var int NextState;
var int MtNextState;
Previously those variables were like this in Pawn.uc:
Code:
// Movement.
var float GroundSpeed; // The maximum ground speed.
var float WaterSpeed; // The maximum swimming speed.
var float AirSpeed; // The maximum flying speed.
var float LadderSpeed; // Ladder climbing speed
var float AccelRate; // max acceleration rate
var(MovementMode) float JumpZ; // vertical acceleration w/ jump
var float AirControl; // amount of AirControl available to the pawn
var float WalkingPct; // pct. of running speed that walking speed is
var bool bOnSlope; // true if the Pawn is on a slope
var float SlopeStartAltitude; // if bOnSlope is true, this stores the beginning altitude of the slope.
var float InterpolatedZ; // this is a shock absorber to smooth out jerky up/down movements - esp. on stairs.
& After I added some of these variables to MovementMode:
Code:
// Movement.
var(MovementMode) float GroundSpeed "The maximum ground speed."; // The maximum ground speed.
var(MovementMode) float WaterSpeed "The maximum swimming speed."; // The maximum swimming speed.
var(MovementMode) float AirSpeed "The maximum flying speed."; // The maximum flying speed.
var(MovementMode) float LadderSpeed "Ladder climbing speed"; // Ladder climbing speed
var(MovementMode) float AccelRate "max acceleration rate"; // max acceleration rate
var(MovementMode) float JumpZ "vertical acceleration w/ jump"; // vertical acceleration w/ jump
var(MovementMode) float AirControl "amount of AirControl available to the pawn"; // amount of AirControl available to the pawn
var(MovementMode) float WalkingPct "pct. of running speed that walking speed is"; // pct. of running speed that walking speed is
var(MovementMode) bool bOnSlope "true if the Pawn is on a slope"; // true if the Pawn is on a slope
var(MovementMode) float SlopeStartAltitude "if bOnSlope is true, this stores the beginning altitude of the slope."; // if bOnSlope is true, this stores the beginning altitude of the slope.
var(MovementMode) float InterpolatedZ "this is a shock absorber to smooth out jerky up/down movements - esp. on stairs."; // this is a shock absorber to smooth out jerky up/down movements - esp. on stairs.
So now they show up in actor browser! But They DO NOT SHOW UP IN THE TRIGGERSCRIPTS!
So I pondered & experimented & I realized the variables that do show up in the triggerscripts use "var(
SomePropertyGroup) inherited(
SomePropertyID)" So I looked at the Property IDs on existing & I added some ints 3000 & above to those variables so I ended up with this:
Code:
// Movement.
var(MovementMode) inherited(3000) float GroundSpeed "The maximum ground speed."; // The maximum ground speed.
var(MovementMode) inherited(3001) float WaterSpeed "The maximum swimming speed."; // The maximum swimming speed.
var(MovementMode) inherited(3002) float AirSpeed "The maximum flying speed."; // The maximum flying speed.
var(MovementMode) inherited(3003) float LadderSpeed "Ladder climbing speed"; // Ladder climbing speed
var(MovementMode) inherited(3005) float AccelRate "max acceleration rate"; // max acceleration rate
var(MovementMode) inherited(3006) float JumpZ "vertical acceleration w/ jump"; // vertical acceleration w/ jump
var(MovementMode) inherited(3007) float AirControl "amount of AirControl available to the pawn"; // amount of AirControl available to the pawn
var(MovementMode) inherited(3008) float WalkingPct "pct. of running speed that walking speed is"; // pct. of running speed that walking speed is
var(MovementMode) inherited(3009) bool bOnSlope "true if the Pawn is on a slope"; // true if the Pawn is on a slope
var(MovementMode) inherited(3010) float SlopeStartAltitude "if bOnSlope is true, this stores the beginning altitude of the slope."; // if bOnSlope is true, this stores the beginning altitude of the slope.
var(MovementMode) inherited(3011) float InterpolatedZ "this is a shock absorber to smooth out jerky up/down movements - esp. on stairs."; // this is a shock absorber to smooth out jerky up/down movements - esp. on stairs.
And now they show up in the triggerscripts!
BUT I don't know if the Property IDs correspond to hardcoded variables so I don't know if they'll work.
EDIT: Initial tests show that they are hardcoded. I wish there was a way to alter the triggerscript manager's behavior . . .
* Adding triggerscrips through the command line:
Code:
Set Class/ClassvisibleName=T3WaterVolume TriggerScripts (TS_4258,TS_4257)
Thus index (0)= TS_4258 & (1)= TS_4257
So any property like the triggerscripts property can be added & their index will reflect the order between the parenthesis.
Courtesy screens:
(
http://img62.imageshack.us/i/t3edrecoveredvars1.jpg/)
Inline Image:
http://img62.imageshack.us/img62/6692/t3edrecoveredvars1.th.jpg(
http://img43.imageshack.us/i/t3edrecoveredvarstsed1.jpg/)
Inline Image:
http://img43.imageshack.us/img43/7410/t3edrecoveredvarstsed1.th.jpg