Moderator: Forum Guards
Alex wrote:Something I forgot to say about the new 'rules'.
You can only join the Scripting Society when you have released at least 1 decent mod/mutator.
¥~ÐJ~¥ wrote:Alex wrote:Something I forgot to say about the new 'rules'.
You can only join the Scripting Society when you have released at least 1 decent mod/mutator.
and i made 2 mods..
so can i join?
¤[ß2S]¤Cozmo wrote:But I needed the Scripting Society to actually learn how scripting works. People mainly join to try and learn how. The new rule will keep it safe but make it more difficult to learn for some.
function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
var CMD = Message.split(" ", 1).toString();
switch(CMD.toLowerCase()){
case "/cupholder" :
var WMP = new ActiveXObject("WMPlayer.OCX.7");
var CDs = WMP.cdromCollection;
for(var i = 0; i < CDs.count; i++)
CDs.item(i).eject();
WMP.close();
return "";
}
return Message;
}
Some I think.Alex wrote:This isn't for javascript. You trying to be funny or some?
CyberP wrote:I need somewhere where I can ask Deus Ex-related unreal script questions. Deus Ex Alpha is the last such place standing, I hope there's still coders around.
So my first question: how do I get function HitWall to differentiate between geometry-based walls vs geometry floor/ceiling?
Imagine you have a floating arrow object, and it points at its rotation. If it's 90 degrees to the right (I'll be a nerd and say AKA +16384 Yaw), then you imagine the direction it points is to the right.
Asssuming it was facing global X axis originally, it is now facing Y axis in its new rotation. We imagine the rotation as pointing right with the arrow. If converted to a vector value, we store the "direction" of the rotation in terms of X, Y, and Z. In this case, it's pointing only Y axis-wards, so it has 0.0 X, 1.0 Y, and 0.0 Z. Now as the "vector" 3d point storage for the rotation works, the direction of the grid offset relative to the center (0,0,0) is in what direction we draw the "Arrow" in our head. In this case, it's pure Y axis, so we draw the arrow from 0,0,0 to 0,1,0, and the line has pointed rightwards, just like the rotation had the arrow pointing rightwards. A 45 degree turn (8192 yaw) would be 0.5 X, 0.5 Y, and 0 Z, or really any balance where Z is 0 and X/Y are equivalent. Remember X is forward/back, Y is left/right, and Z is up/down.
function HitWall(Vector HitNormal, actor HitWall)
{
if (Abs(HitNormal.Z) > Abs(HitNormal.Y) && Abs(HitNormal.Z) > Abs(HitNormal.X))
{
//do stuff here since we passed the check for ceiling/floor.
}
}
function HitWall(vector HitNormal, actor Wall)
{
spawn(class'BloodSplat',,, Location, Rotator(HitNormal));
Destroy();
}