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 06-17-2008, 11:12 AM
wilikas wilikas is offline
Isitme youre looking for?
wilikas's Avatar
Join Date: Apr 2005
Location: Australia
Posts: 35
wilikas is on a distinguished road
Toweapons

Can someone please point out the obvious flaw here? It looks fine to me though.
But i'm a noob so everything looks fine to me >.>

edit: Script: Function toweapons not found at line 2 in script of baddydropper (in level inside_osl.nw at pos (30.5, 30.5)) pops up in RC. Any ideas?

NPC Code:
function onPlayerTouchsme() {
toweapons(BaddyDropper);}
function onWeaponFired() {
putcomp graysoldier, mousex, mousey;
}

__________________

Legal threats should go through the support center.

Last edited by wilikas; 06-17-2008 at 11:38 AM..
Reply With Quote
  #2  
Old 06-17-2008, 11:45 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Yeah, you shouldn't be using toweapons. It's an old function that has been long deprecated.

Your weapon script should be added into the weapons list in RC/NC, and then use player.addweapon(weaponname); serverside instead.
Reply With Quote
  #3  
Old 06-17-2008, 11:55 AM
wilikas wilikas is offline
Isitme youre looking for?
wilikas's Avatar
Join Date: Apr 2005
Location: Australia
Posts: 35
wilikas is on a distinguished road
Come again?

Serverside?
I added the script into RC/NC.

In the Weapons section of NC i have
NPC Code:
function onWeaponFired() {
putcomp graysoldier, mousex, mousey;
}



and on the level where the sign is held (you touch the sign to obtain the NPC) i have
NPC Code:
onPlayerTouchsme(){
player.addweapon(BaddyDropper);
}

__________________

Legal threats should go through the support center.

Last edited by wilikas; 06-17-2008 at 12:02 PM.. Reason: left out stuffs
Reply With Quote
  #4  
Old 06-17-2008, 01:08 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
PHP Code:
function onPlayerTouchsMe() {
  
player.addWeapon("BaddyDropper");

Reply With Quote
  #5  
Old 06-17-2008, 10:51 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
putcomp( "graysoldier", mousex, mousey );

Also, that probably won't work, as I recall Graal disconnects you if it detects you added a baddy.
__________________
Reply With Quote
  #6  
Old 06-18-2008, 09:26 AM
wilikas wilikas is offline
Isitme youre looking for?
wilikas's Avatar
Join Date: Apr 2005
Location: Australia
Posts: 35
wilikas is on a distinguished road
Sucky

That sucks, is there a way around it?
__________________

Legal threats should go through the support center.
Reply With Quote
  #7  
Old 06-18-2008, 12:18 PM
wild8900 wild8900 is offline
Mr. Brightside
wild8900's Avatar
Join Date: Dec 2005
Posts: 418
wild8900 is an unknown quantity at this point
Send a message via MSN to wild8900
Your script sounds awfully abusive.
Reply With Quote
  #8  
Old 06-18-2008, 02:34 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by wilikas View Post
That sucks, is there a way around it?
Yes, script your own baddies ... there are some in the Code Gallery I believe.

Old baddies (built-in to editor) are deprecated.
__________________
Reply With Quote
  #9  
Old 06-19-2008, 09:23 AM
wilikas wilikas is offline
Isitme youre looking for?
wilikas's Avatar
Join Date: Apr 2005
Location: Australia
Posts: 35
wilikas is on a distinguished road
Indeed

Quote:
Originally Posted by wild8900 View Post
Your script sounds awfully abusive.
Yes, it does, it's intended purpose was to be for event based purposes.
__________________

Legal threats should go through the support center.
Reply With Quote
  #10  
Old 06-19-2008, 07:56 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Might be possible to use that serverside ...
__________________
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 01:30 AM.


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