Thread: Creatures
View Single Post
  #6  
Old 07-24-2001, 07:02 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
vecx and vecy is weird but it works.
erm ill try to explain what it does and how it does..
what it does is ..
it returns a -1 or a 0 or a 1 . depending on the playerdir. and its used to move things ''forward'' or backwards or whatever..
if you do
playerx+=vecx(playerdir);
playery+=vecy(playerdir);
it will move the player 1 spot forward. (the way hes facing)
how it does is simple..
ill tell you in english
if playerdir is 0 (up) vecx returns 0 and vecy -1
if playerdir is 1 (left) vecx returns -1 and vecy 0
if playerdir is 2 (down) vecx returns 0 and vecy 1
if playerdir is 3 (left) vecx returns 1 and vecy 0

its also usefull for triggeraction
triggeraction playerx+1.5+(vecx(playerdir)*2),
playery+2+(vecy(playerdir)*2),blabla;

=)
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote