Thread: Golem
View Single Post
  #3  
Old 02-08-2002, 04:17 AM
TDK_RC6 TDK_RC6 is offline
Registered User
TDK_RC6's Avatar
Join Date: Jan 2002
Location: Earth
Posts: 0
TDK_RC6 is on a distinguished road
Re: Golem

Quote:
Originally posted by lordhelmut
Anyone know why this ****s up?

// NPC made by Floating Head
if(created){
this.mode=0;
}
if (playertouchsme) {
toweapons Golem;
}
if(weaponfired){
if(this.mode=0){
this.mode=1;
timeout=.05;
}
if(this.mode=1){
this.mode=0;
setani idle,;
}
}
if(timeout){
if(keydown(0)){
setani golem_walk-up,;
timeout=.05;
}
if(keydown(1)){
setani golem_walk-left,;
timeout=.05;
}
if(keydown(2)){
setani golem_walk-down,;
timeout=.05;
}
if(keydown(3)){
setani golem_walk-right,;
timeout=.05;
}
if(keydown(5)){
setani golem_slam,;
timeout=.05;
}
else{
setani golem_down-idle,;
}
timeout=.05;
}

For some reason if u stand still it walks and if u hold down a key its idle =/

okay, here is the problem

NPC Code:

if(weaponfired){
if(this.mode=0){ // If this.mode equals zero (then it will set to 1;
this.mode=1;
timeout=.05;
}
if(this.mode=1){ // then it checks to see if this.mode is 1 and then sets it back to 0
this.mode=0;
setani idle,;
}
}



try doing this

if (weaponfired) {
if (this.mode=0) {
this.mode=1; timeout=.05;
} else if (this.mode==1) {
this.mode=0; setani idle,; }
}
__________________
Staff on Renegade


email: [email protected]
aim: papivicente
Reply With Quote