Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-31-2001, 02:57 PM
Jerom Jerom is offline
Banned
Jerom's Avatar
Join Date: Mar 2001
Location: In a Trash Can
Posts: 3,708
Jerom is on a distinguished road
Send a message via AIM to Jerom
Unhappy NPC Baddies...

Hiyas!
Before I say anything, I'll just say, I SUCK AT SCRIPTING!!!!
ok..
Now I was trying to make a baddie that would move around randomly, and between directional switces, it would pause 1 second, then it would pick a random direction, or it would just stay still for another second again.
All I get out of this script is a bunch of MESSED UP LOOKIN' movement that makes my baddie look like it took some crack cocaine right after running around firepole for at LEAST 7 years straight. I also would like if someone could tell me how to make it so that when the baddie wasn't walking, it would change to idle.gani.
If you are thinking of just re-creating the script(because my work SUCKS), please make it long and drawn out so that us newbie scripters can understand what the script is doing. - thanks
---
//Script made by Jerom
//Isawk@scriptin'
if (created && playerenters) {
dontblock;
drawoverplayer;
timeout = 0.05;
this.speed = 0.09;
setarray move,4;
}

if (timeout && this.stop==0){
this.mmode = random(0,50);
timeout = 0.05;
}
if (this.mmode<=10 && timeout){
move[3] = 1;
this.stop = 1;}
if (move[3]==1 && timeout){
x+=this.speed;
move[4] = random(0,50);
this.stop = 1;}
if (this.mmode>10 && this.mmode<20 && timeout) {
move[2] = 1;}
if (move[2]==1 && timeout){
y+=this.speed;
move[4] = random(0,50);
this.stop = 1;}
if (this.mmode>20 && this.mmode<30 && timeout){
move[1] = 1;}
if (move[1]==1 && timeout){
x-=this.speed;
move[4] = random(0,50);
this.stop = 1;}
if (this.mmode>30 && this.mmode<=40 && timeout) {
move[0] = 1;
}
if (move[0]==1 && timeout){
y-=this.speed;
move[4] = random(0,50);}
if (move[4]<=10) {
move[0] = 0;
move[1] = 0;
move[2] = 0;
move[3] = 0;
this.stop = 0;
this.mmode = random(0,50);}
if (this.mmode>40 && this.mmode<50) {
sleep 1;
timeout = 0.05;}
Reply With Quote
 


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 05:28 PM.


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