Walking On Walls
<div class="IPBDescription">Alien Walking on Walls feature</div> Hi,
I was wanting to ask a quick question to the coding team of Natural Selection and hopefully this is the right forum.Oh well here it goes, I was wondering how you did the Alien walking on walls in NS <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->. I was guessing Vectors and such but im no expert coder and puzzled by walking on walls. A quick explantion or a little code would do fine. The fans of our mod were requesting it be done but Kamisorix (lead coder) didn't know how to do it and I didnt want to let the fans down so I came here. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
ciao,
steele
btw- If you don't know what I mean, here is the url to the topic <a href='http://s4.invisionfree.com/NTP/index.php?act=Post&CODE=02&f=1&t=263' target='_blank'>Walking on walls topic</a> thanks again.
I was wanting to ask a quick question to the coding team of Natural Selection and hopefully this is the right forum.Oh well here it goes, I was wondering how you did the Alien walking on walls in NS <!--emo&???--><img src='http://www.unknownworlds.com/forums/html//emoticons/confused.gif' border='0' style='vertical-align:middle' alt='confused.gif' /><!--endemo-->. I was guessing Vectors and such but im no expert coder and puzzled by walking on walls. A quick explantion or a little code would do fine. The fans of our mod were requesting it be done but Kamisorix (lead coder) didn't know how to do it and I didnt want to let the fans down so I came here. <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
ciao,
steele
btw- If you don't know what I mean, here is the url to the topic <a href='http://s4.invisionfree.com/NTP/index.php?act=Post&CODE=02&f=1&t=263' target='_blank'>Walking on walls topic</a> thanks again.
Comments
The best place to ask about stuff like this is actualy the mod resource places...
there are a few, unfortunatly I don't remember them ATM
DOOMeh Know what they are (as I remember him mentioning them a few times)
<!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo--> Thx Nemisis
Haha, would work, crappy tough <!--emo&:D--><img src='http://www.unknownworlds.com/forums/html//emoticons/biggrin.gif' border='0' style='vertical-align:middle' alt='biggrin.gif' /><!--endemo-->
Didn't Max do a lot of it, or did he just do the model rotation? In any case, Max has informed us that he's not working on NS anymore.
to bad (he did alot of great things)
However, no Flayra did almost all of NS1 by himself from what I understand (Max came in like right after the first release if my mind serves me corectly....)
Pretty much a modified ladder code.
That would be how I would go about doing it. But then again I'm a complete nub. :P
Max joined around 2.0, wallwalking is a 1.0 feature, which was all done by Charlie. It's indeed sad to see Max go, but I can easily understand why Iron Lore wouldn't want one of their main coders entangled in a project that's now essentially part of a competing companies lineup.
Top Secret Game.....
Well if Max is ONE of the people working on that game I can't wait to see what it is <!--emo&:)--><img src='http://www.unknownworlds.com/forums/html//emoticons/smile.gif' border='0' style='vertical-align:middle' alt='smile.gif' /><!--endemo-->
no worries about gravity or anything; just use the ladder code as per usual. Not so sure about detection but the idea is that your alien will be in fly mode until it doesn't have a brush within a certain distance... maybe do a radial check? ~shrugs~
probably returning a pointer from your collision test and you forgot to check if it's NULL before using it resulting in it trying to calc something that's not there and exploding =3
...simply because you can +moveup on walls and in water but not on ladders...
And I said ladder movement, not gravity =P
To refine the suggestion a little more perhaps you should look at what detects that you've touched a func_ladder and change it to detecting if you're touching anything at all XD
Ladders and water are actually not far off the same thing in the HL engine disco =3
They both make your char change from movetype step to movetype fly there's probably just a small piece of code that checks to see if you're near a ladder before allowing moveup that's all. I'd have to look into it more to be honest but I can't be bothered lol ^^
...simply because you can +moveup on walls and in water but not on ladders... <!--QuoteEnd--> </td></tr></table><div class='postcolor'> <!--QuoteEEnd-->
Yup, that's what I heard on LunixMonster. Walls are treated like the skulk would be in water, but with unlimited air.
<!--c1--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td><b>CODE</b> </td></tr><tr><td id='CODE'><!--ec1-->
inline void wow( )
{
if(pmove->cmd.buttons & IN_FORWARD /*&&*/)
{
pmtrace_t trace;
vec3_t end, right;
vect3_t smove; //units
smove = 5; // 5 units
for (i=0; i<2; i++){ //check wall, used in water code
end[i] = pmove->origin[i] + right[i] * smove;
trace = pmove->PM_PlayerTrace (pmove->origin, end, PM_WORLD_ONLY, -1 ); //trace to the world only!
}
if ( trace.fraction != 1.0 ) //if there was a wall there
{
float forward = 0, right = 0;
vec3_t vpn, v_right;
pev->movetype = MOVETYPE_FLY;
AngleVectors( pmove->angles, vpn, v_right, NULL );
if ( pmove->cmd.buttons & IN_FORWARD )
forward += MAX_CLIMB_SPEED;
if ( pmove->cmd.buttons & IN_MOVELEFT )
right -= MAX_CLIMB_SPEED;
if ( pmove->cmd.buttons & IN_MOVERIGHT )
right += MAX_CLIMB_SPEED;
if ( pmove->cmd.buttons & IN_JUMP )
pmove->movetype = MOVETYPE_WALK;
}
return;
}
<!--c2--></td></tr></table><div class='postcolor'><!--ec2-->
If this is right please tell me and rip my code if you want to (if its right) and put it in your own mod, I dont want fellow coders having to play guess and check with their wall jumping code. <!--emo&::nerdy::--><img src='http://www.unknownworlds.com/forums/html//emoticons/nerd.gif' border='0' style='vertical-align:middle' alt='nerd.gif' /><!--endemo-->