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 02-21-2004, 03:10 AM
crazy_dude92 crazy_dude92 is offline
Registered User
Join Date: Feb 2004
Location: sum where over a rainbow
Posts: 2
crazy_dude92 is on a distinguished road
i need 2 know how 2 script a dance floor

Is it easy to script a dance floor, or a trampoline?
It would be nice if someone could explain me how to script such, or perhaps a gun, or a train, lol.

Last edited by Loriel; 02-21-2004 at 10:05 PM..
Reply With Quote
  #2  
Old 02-21-2004, 04:43 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
That is not the way to learn scripting.
Have a look at the available commands, and read through existing scripts, in order to understand how you can achieve things and how to interact with the game engine.
Asking questions like these does not really help.
Reply With Quote
  #3  
Old 02-21-2004, 04:45 AM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
I believe there is a rule that states "Do not ask for scripts"

I think you should read them
Reply With Quote
  #4  
Old 02-21-2004, 04:53 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
I think the original poster is just trying to learn.
Reply With Quote
  #5  
Old 02-21-2004, 05:00 AM
SlikRick SlikRick is offline
Retired
Join Date: Aug 2003
Location: Minnesota,USA
Posts: 685
SlikRick is on a distinguished road
This will help you out on your scripting...helped me out alot.
Attached Files
File Type: zip nsb.zip (86.8 KB, 245 views)
Reply With Quote
  #6  
Old 02-21-2004, 11:17 AM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Quote:
Originally posted by SlikRick
This will help you out on your scripting...helped me out alot.
He just wants the script, he isn't going to learn any of it
Good of you to attach it though :-)
__________________
V$:CONFL16T
Reply With Quote
  #7  
Old 02-21-2004, 12:02 PM
SlikRick SlikRick is offline
Retired
Join Date: Aug 2003
Location: Minnesota,USA
Posts: 685
SlikRick is on a distinguished road
Well its better to learn so you know what to do and how to use what properly so the next time they script they wont have to ask for that much help. It really goes into depth about each command and how to use em =X
Reply With Quote
  #8  
Old 02-21-2004, 03:48 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Just change player's directions and movements randomly in a determined place. It's not that hard.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #9  
Old 02-21-2004, 05:08 PM
Destorm Destorm is offline
Owner of Leviathan?
Destorm's Avatar
Join Date: Apr 2003
Location: England
Posts: 161
Destorm is on a distinguished road
Send a message via AIM to Destorm
Dance -
Use :-
If
playerx in ||
playery in ||
setplayer ani

Gun :-
If
setplayer ani
Shoot
actionprojectile (serverside)

Train :-
If
setplayerani
playerx
playery
for
__________________

-Make sure you lock every thread you can Mods-
Reply With Quote
  #10  
Old 02-21-2004, 05:46 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by Destorm
<commands />
It's setani not setplayerani. Also, actionprojectile events work not only server-side but client-side too.
Don't you think that he'll need to use 'if' since he will have to call an event on his script? (lol?)
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /

Last edited by Loriel; 02-23-2004 at 11:29 AM..
Reply With Quote
  #11  
Old 02-21-2004, 08:28 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Got bored so...
Dance:
NPC Code:

//#CLIENTSIDE
if (playerenters) timeout=.05;
if (timeout) {
if ((playerx in |0,32|) && (playery in |0,64|)) { //play with the numbers i made it work for the left half of the level
playersprite=int(random(0,41));
}
timeout=.5;
}

__________________
Reply With Quote
  #12  
Old 02-21-2004, 11:09 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by ZeLpH_MyStiK
Got bored so...
Dance:
NPC Code:

..
playersprite=int(random(0,41));
..

playersprite is kinda "deprecated" since when Graal2001 was released. Ganis are probably the best solution. I would probably create a string with the ganis and use random(#) for the randomly movements.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #13  
Old 02-21-2004, 11:14 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
This thread makes me remenisc the past...
I loved that script what Cynadine made
__________________
V$:CONFL16T
Reply With Quote
  #14  
Old 02-23-2004, 03:32 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally posted by osrs


playersprite is kinda "deprecated" since when Graal2001 was released. Ganis are probably the best solution. I would probably create a string with the ganis and use random(#) for the randomly movements.
lol look at your method and mine...which one is easier? xD
__________________
Reply With Quote
  #15  
Old 02-23-2004, 05:10 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally posted by ZeLpH_MyStiK

lol look at your method and mine...which one is easier? xD
I'll always use sprites before I make a gani, less work + less files = happier me
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #16  
Old 02-23-2004, 08:04 AM
Deek2 Deek2 is offline
Registered User
Join Date: May 2002
Location: Springfield, Missouri
Posts: 1,578
Deek2 is on a distinguished road
Why not go through with him the structure of the actual script (what needs to be what, how and where and why) without actually telling him the actual script? It's a good way of teaching him to learn, because he still has to actually script it out all by himself.
Reply With Quote
  #17  
Old 02-23-2004, 10:12 AM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Quote:
Originally posted by Deek2
Why not go through with him the structure of the actual script (what needs to be what, how and where and why) without actually telling him the actual script? It's a good way of teaching him to learn, because he still has to actually script it out all by himself.
I guess, but what is the point when he hasn't replied?
__________________
V$:CONFL16T
Reply With Quote
  #18  
Old 02-23-2004, 10:57 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally posted by Deek2
Why not go through with him the structure of the actual script (what needs to be what, how and where and why) without actually telling him the actual script? It's a good way of teaching him to learn, because he still has to actually script it out all by himself.
I did leave comments...most of it is pretty much self-explanatory
__________________
Reply With Quote
  #19  
Old 02-24-2004, 01:06 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by ZeLpH_MyStiK

lol look at your method and mine...which one is easier? xD

NPC Code:

if(playersays(Hi)) message Hi;



NPC Code:

if(playerchats && strequals(#c,Hi)) message Hi;



Wich one is easier and wich one is most efficient?
Think about it.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #20  
Old 02-24-2004, 02:25 AM
dlang dlang is offline
Yoshi!
dlang's Avatar
Join Date: Oct 2002
Location: Houston, Texas
Posts: 406
dlang is on a distinguished road
Send a message via AIM to dlang Send a message via MSN to dlang
Quote:
Originally posted by Loriel
That is not the way to learn scripting.
Have a look at the available commands, and read through existing scripts, in order to understand how you can achieve things and how to interact with the game engine.
Asking questions like these does not really help.
I learned most of what i know about scripting by taking apart other scripts to see how they work. So don't go on saying that stuff because you're not always right :O
__________________
Where do I take this pain of mine?
I run but it stays right by my side.
So tear me open, pour me out,
there's things inside that scream and shout.
And the pain still hates me, so hold me until it sleeps.

---------------
Reply With Quote
  #21  
Old 02-24-2004, 03:17 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally posted by osrs



NPC Code:

if(playersays(Hi)) message Hi;



NPC Code:

if(playerchats && strequals(#c,Hi)) message Hi;



Wich one is easier and wich one is most efficient?
Think about it.
??? you just brought a whole new topic =\
__________________
Reply With Quote
  #22  
Old 02-24-2004, 06:48 AM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
Quote:
Originally posted by osrs



NPC Code:

if(playersays(Hi)) message Hi;



NPC Code:

if(playerchats && strequals(#c,Hi)) message Hi;



Wich one is easier and wich one is most efficient?
Think about it.
Note: ganis are not neccesarily more efficient than sprite manipulation (even though it is now just setting the gani step of def.gani)
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
Reply With Quote
  #23  
Old 02-24-2004, 02:18 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Let this thread die.
It has went offtopic since the original poster does not seem to care anymore. You are free to restart your discussion in another thread if you really want.
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 08:30 AM.


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