Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-20-2001, 09:19 PM
JinZero JinZero is offline
something vague
Join Date: Mar 2001
Location: pokemon
Posts: 1,384
JinZero is on a distinguished road
Send a message via AIM to JinZero
Target Practice

i need a npc like a target, it moves and u have to shoot it with arrow or a fireball, i know this is pretty easy for some of u but not 4 me , how do i script it?
Reply With Quote
  #2  
Old 05-20-2001, 10:16 PM
Thak2 Thak2 is offline
:]
Join Date: Mar 2001
Location: BC
Posts: 1,344
Thak2 is on a distinguished road
Send a message via AIM to Thak2
Hope this can be useful...
NPC Code:
if (playerenters) {
timeout = 0.05;
}
if (playerenters&&isleader) {
i = random(0,2);
if (i<2) {this.mode = 0;}
if (i>1&&i<3) {this.mode = 1;}
timeout = 0.05;
}
if (timeout) {
timeout = 0.05;
}
if (timeout&&this.mode=0) {
x -= 0.2;
timeout = 0.05;
}
if (timeout&&this.mode=1) {
x += 0.2;
timeout = 0.05;
}
if (timeout&&onwall(x,y+1)&&this.mode=0) {
this.mode = 1;
}
if (timeout&&onwall(x+2,y+1)&&this.mode=1) {
this.mode = 0;
}
if (wasshot) {
message BINGO!;
sleep 2;
message ;
timeout = 0.05;
}


Note: this was made for a 32x32 image
Reply With Quote
  #3  
Old 05-21-2001, 03:35 AM
JinZero JinZero is offline
something vague
Join Date: Mar 2001
Location: pokemon
Posts: 1,384
JinZero is on a distinguished road
Send a message via AIM to JinZero
Thanks, but do u know how i can make the target go a certain length then it'll hide for 5 seconds, and it'll come back at the beginning of where it started moving?
__________________
there's. no. retreat.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.