Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-03-2002, 10:23 AM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
What should be added to the commands...

a good command that could be added would be....
endfunction <functionname>;
that would hel big time so you wouldnt have to end a function by using scripts inside of it...dont you guys think?
__________________
Reply With Quote
  #2  
Old 04-03-2002, 10:33 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
a function ends automatically once the script inside it is over
Reply With Quote
  #3  
Old 04-03-2002, 12:36 PM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
Quote:
Originally posted by Python523
a function ends automatically once the script inside it is over
i mean for when its in a timeout.... should have been more clear
__________________
Reply With Quote
  #4  
Old 04-03-2002, 12:52 PM
zallus-k zallus-k is offline
Registered User
Join Date: Sep 2001
Location: AC0265, Zaroke
Posts: 122
zallus-k is on a distinguished road
.

Give an example of your command in usage, pertaining to how you failed to create this function before having this command.
__________________

Solemn Destiny - Owner
Reply With Quote
  #5  
Old 04-03-2002, 10:05 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Goboom

i mean for when its in a timeout.... should have been more clear
easy to get around it, just set a var and increase it by one everytime time the function is called, increase it by one and when the function is greater than a certain number, make it so it wont call it
Reply With Quote
  #6  
Old 04-03-2002, 10:34 PM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
Quote:
Originally posted by Python523

easy to get around it, just set a var and increase it by one everytime time the function is called, increase it by one and when the function is greater than a certain number, make it so it wont call it
ya i knew bout that....but it would be alot easyer if i had somthing like...
NPC Code:

if (playerenters||timeout){
timeout=0.05;
ShownameGoboom();}
if (playertouchsme){
endfunction ShownameGoboom; ShownameCoolio();}
function ShownameGoboom(){
message Goboom;}
function ShownameCoolio(){
message Coolio;}

__________________
Reply With Quote
  #7  
Old 04-04-2002, 05:17 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Red face

just have a variable keep track of what to show

NPC Code:

// NPC made by screen_name

if (playerenters||timeout) {
if (this.track==0) {
ShowName_Goboom();
} elseif (this.track==1) {
ShowName_screen_name();
}
timeout=.1;
}

if (playertouchsme) {
this.track=abs(this.track-1);
}

function ShowName_Goboom() {
message Hola Goboom!;
}

function ShowName_screen_name() {
message Hola screen_name!;
}

__________________
[signature]insert here[/signature]
Reply With Quote
  #8  
Old 04-04-2002, 10:40 AM
Kadar Kadar is offline
Registered User
Join Date: Jan 2002
Posts: 636
Kadar is on a distinguished road
hidesparrating <number>;
disablepause <number>;

Number is where the number you want the spar rating hidden, or the pause disabled k?
so..

disablepause 2;

That would disable the player from using the pause button for 2 seconds..

Lets say i wanted the pause button to never work?

if (playerenters || timeout){
disablepause 0.05;
timeout = 0.05;
}
__________________
Reply With Quote
  #9  
Old 04-04-2002, 10:53 AM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
Quote:
Originally posted by screen_name
just have a variable keep track of what to show

NPC Code:

// NPC made by screen_name

if (playerenters||timeout) {
if (this.track==0) {
ShowName_Goboom();
} elseif (this.track==1) {
ShowName_screen_name();
}
timeout=.1;
}

if (playertouchsme) {
this.track=abs(this.track-1);
}

function ShowName_Goboom() {
message Hola Goboom!;
}

function ShowName_screen_name() {
message Hola screen_name!;
}

yes i know how you could do that...but my way is just shorter and easyer
__________________
Reply With Quote
  #10  
Old 04-04-2002, 10:59 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Ummmmm...
There are 2 things that you can use...
Break; or Return;
they both end the function.
return is probably what you are looking for...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
Reply With Quote
  #11  
Old 04-04-2002, 12:07 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
A command that I would love to have added would be something like:

NPC Code:
if (created){
setimg door.png;
flipimg door.png,flipradius;
}


Maybe it's just me, because, I'm lazy. But, I'm sure I'm not the only one who hates having to open a graphics program and flip an image.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #12  
Old 04-04-2002, 01:05 PM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
Quote:
Originally posted by joseyisleet
-=Josey=-
A command that I would love to have added would be something like:

NPC Code:
if (created){
setimg door.png;
flipimg door.png,flipradius;
}


Maybe it's just me, because, I'm lazy. But, I'm sure I'm not the only one who hates having to open a graphics program and flip an image.
stefan said something about adding a command...called rotate...
__________________
Reply With Quote
  #13  
Old 04-04-2002, 01:13 PM
AlexH AlexH is offline
Have A Drink On Me
AlexH's Avatar
Join Date: Jun 2001
Location: Somewhere In Time
Posts: 7,442
AlexH is on a distinguished road
Send a message via AIM to AlexH Send a message via MSN to AlexH
doesnt break do that then it continues with the script after the function
Reply With Quote
  #14  
Old 04-04-2002, 01:33 PM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
you guys dont get what im getting at...
__________________
Reply With Quote
  #15  
Old 04-04-2002, 03:22 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
Quote:
Originally posted by Goboom

stefan said something about adding a command...called rotate...
-=Josey=-
Oh, I haven't been home for the last two weeks. I was locked up. Now I'm out on bail and will be going back soon.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #16  
Old 04-04-2002, 08:55 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
i understand what he wants

__________________
[signature]insert here[/signature]
Reply With Quote
  #17  
Old 04-04-2002, 10:28 PM
Spanko Spanko is offline
Squeaker of Soles
Spanko's Avatar
Join Date: Nov 2001
Location: The Netherworl...lands
Posts: 1,366
Spanko is on a distinguished road
Send a message via ICQ to Spanko Send a message via AIM to Spanko Send a message via Yahoo to Spanko
Quote:
Originally posted by AlexH
doesnt break do that then it continues with the script after the function
It's return, but apart from that you're completely right.
__________________

ICQ: 125283920
MSN: [email protected]
AIM: Squeax0r
Squeaker seems unable to access the forum using this account.. tis a sad day.
Now with occasional Asuka flavour! Ooops a bit too much...
Asuka should be king of Dustari!

"Y'know, some days even my lucky rocketship underpants don't even help."
Reply With Quote
  #18  
Old 04-04-2002, 11:23 PM
Goboom Goboom is offline
Pixel Monkey
Goboom's Avatar
Join Date: Dec 2001
Location: Michigan
Posts: 1,702
Goboom is on a distinguished road
Send a message via ICQ to Goboom Send a message via AIM to Goboom Send a message via MSN to Goboom Send a message via Yahoo to Goboom
i know about all these commands (break,continue,and return) but just dont want to use them....i like mine....
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


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