Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Toweapons (https://forums.graalonline.com/forums/showthread.php?t=80114)

wilikas 06-17-2008 11:12 AM

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;
}


Skyld 06-17-2008 11:45 AM

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.

wilikas 06-17-2008 11:55 AM

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);
}


Crow 06-17-2008 01:08 PM

PHP Code:

function onPlayerTouchsMe() {
  
player.addWeapon("BaddyDropper");



cbk1994 06-17-2008 10:51 PM

putcomp( "graysoldier", mousex, mousey );

Also, that probably won't work, as I recall Graal disconnects you if it detects you added a baddy.

wilikas 06-18-2008 09:26 AM

Sucky
 
That sucks, is there a way around it?

wild8900 06-18-2008 12:18 PM

Your script sounds awfully abusive.

cbk1994 06-18-2008 02:34 PM

Quote:

Originally Posted by wilikas (Post 1397854)
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.

wilikas 06-19-2008 09:23 AM

Indeed
 
Quote:

Originally Posted by wild8900 (Post 1397857)
Your script sounds awfully abusive.

Yes, it does, it's intended purpose was to be for event based purposes.

cbk1994 06-19-2008 07:56 PM

Might be possible to use that serverside ...


All times are GMT +2. The time now is 10:46 PM.

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