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 04-25-2001, 12:21 AM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Talking

Yay, I've just made an NPC for making a level pure and utter chaos! And yes I realize that it has probably been done before and that anyone who knows how the board array stuff works could script it. But it's still fun
NPC Code:
//NPC Made by Grim Squeaker
//If you give x1 or y1 a higher value then
//x2 or y2 nothing will happen at all.
if (created) {
this.x1=0; //Leftmost part of chaos
this.x2=64;//Rightmost part of chaos
this.y1=0; //Highest part of chaos
this.y2=64;//Lowest part of chaos
}
if (playerenters||timeout) {
if (isleader) {
for (this.i=this.x1;this.i<this.x2;this.i++) for (this.j=this.y1;this.j<this.y2;this.j++) {
if (this.grassonly==0) {
this.a = int(random(0,15));
this.b = int(random(0,255));
board[this.i+64*this.j] = this.a+this.b*16;
}
}
updateboard this.x1,this.y1,this.x2-this.x1,this.y2-this.y1;
}
timeout=0.05;
timereverywhere;
}

__________________

Reply With Quote
  #2  
Old 05-02-2001, 07:33 AM
GexGecko GexGecko is offline
Registered User
Join Date: Mar 2001
Location: Deep in Heck
Posts: 169
GexGecko is on a distinguished road
Send a message via AIM to GexGecko Send a message via Yahoo to GexGecko
RESCUE WORKERS SAVE ME!!
__________________
I think I'll have fun in my siggy!
Funny Sayings by Omochao:
"Welcome do the desert! It's hot!"
"OK, i understand... I'll eat all my carrots now"
Reply With Quote
  #3  
Old 05-02-2001, 07:38 AM
milotheman milotheman is offline
Banned
milotheman's Avatar
Join Date: Apr 2001
Posts: 0
milotheman is on a distinguished road
that was awsome
Reply With Quote
  #4  
Old 05-02-2001, 07:40 AM
GexGecko GexGecko is offline
Registered User
Join Date: Mar 2001
Location: Deep in Heck
Posts: 169
GexGecko is on a distinguished road
Send a message via AIM to GexGecko Send a message via Yahoo to GexGecko
OOPS! Here ya go!
__________________
I think I'll have fun in my siggy!
Funny Sayings by Omochao:
"Welcome do the desert! It's hot!"
"OK, i understand... I'll eat all my carrots now"
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 05:05 PM.


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