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 10-05-2003, 11:09 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
New Scripting Engine Suggestions

Well, i got this idea mainly from JavaScript. In Javascript, you can edit objects on a website, with comments like:
NPC Code:

document.write.Hi i know Javascript
form.name.write.Me too!


Wouldn't it be very useful if this was possible with GScript too?
NPC Code:

//Statue
name=Statue
function switch(){
setgani statue_switch;
}


This is a statue that will switch when a lever is pulled
NPC Code:

//Lever
if (playertouchsme){
level.npc.Statue.switch();
}


So you have to "declare" a NPC first (else it can't be accesed from outside). So you can also destroy a NPC from outside(level.npc.--name--.destroy and a lot of other functions. Also, maybe tiles could be accesable, and links.
Quote:
My list of accesable objects:

level.npc
level.tile
level.link
player.head
player.body
playery.chat
player.colors
player.sword
player.shield
player.attributes
server.players
server.npcs.type
server.tiles.type
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #2  
Old 10-05-2003, 11:44 PM
Riot-Starter Riot-Starter is offline
Registered User
Join Date: Aug 2001
Location: Central Florida, USA
Posts: 79
Riot-Starter is on a distinguished road
Send a message via AIM to Riot-Starter
I would not suggest until the language is released.

Cause it might already exist in it.
Reply With Quote
  #3  
Old 10-05-2003, 11:48 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
Someone correct me if I am wrong, but I believe a few things are either pretty much exactly like that or very very similar with the new engine.
__________________
Reply With Quote
  #4  
Old 10-06-2003, 12:00 AM
amonrabr amonrabr is offline
Scripter
Join Date: Nov 2001
Location: Brazil
Posts: 374
amonrabr is on a distinguished road
Re: New Scripting Engine Suggestions

Quote:
Originally posted by GoZelda
Well, i got this idea mainly from JavaScript. In Javascript, you can edit objects on a website, with comments like:
NPC Code:

document.write.Hi i know Javascript
form.name.write.Me too!


Wouldn't it be very useful if this was possible with GScript too?
NPC Code:

//Statue
name=Statue
function switch(){
setgani statue_switch;
}


This is a statue that will switch when a lever is pulled
NPC Code:

//Lever
if (playertouchsme){
level.npc.Statue.switch();
}


So you have to "declare" a NPC first (else it can't be accesed from outside). So you can also destroy a NPC from outside(level.npc.--name--.destroy and a lot of other functions. Also, maybe tiles could be accesable, and links.

That will be possible in the new script engine, just wait
Reply With Quote
  #5  
Old 10-06-2003, 01:09 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
it's called OOP
Reply With Quote
  #6  
Old 10-06-2003, 06:32 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by Python523
it's called OOP
I already thought so, but i sorta learned you don't gotta speak to fast o.o
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
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:50 AM.


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