Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Eh Help with my script please? (https://forums.graalonline.com/forums/showthread.php?t=65499)

Coolkid77742 04-19-2006 04:20 AM

Eh Help with my script please?
 
Ok I was trying to make a simple body switch script so if my player touchs theres he has there nick and outfit.... and the other player has mine... yeah they switch outfits...
This is my attempt:

function onPlayerTouchsMe() {
player.colors[0]=this.colors[0];
player.colors[1]=this.colors[1];
player.colors[2]=this.colors[2];
player.colors[3]=this.colors[3];
player.colors[4]=this.colors[4];
player.bodyimg=this.bodyimg;
player.headimg=this.headimg;
player.shieldimg=this.shieldimg;
}

but it wont work

Moondeath_2 04-19-2006 04:49 AM

Where are the this.strings added into all of this?

Coolkid77742 04-19-2006 05:02 AM

gs2

Moondeath_2 04-19-2006 05:16 AM

I know it's gs2 but you only posted this and I noticed you didn't have any of these this.strings in the script so it's returned to NULL.

ApothiX 04-19-2006 02:32 PM

Quote:

Originally Posted by Moondeath_2
I know it's gs2 but you only posted this and I noticed you didn't have any of these this.strings in the script so it's returned to NULL.

Quote:

Originally Posted by Coolkid77742
so if my player touchs theres he has there nick and outfit....

He's obviously setting them if he's trying to make the player mimic the look.

Have you tried changing it from serverside to clientside, or vice-versa?

Sage_Shadowbane 04-25-2006 08:35 PM

Make sure you have the script clientsided so it will directly effect the players client, and also.. if you havnt already (which from your post it seems you havnt) make sure you are setting the variables to a color in the onCreated() function.

xAndrewx 04-25-2006 08:41 PM

the player's 'image' can be changed both serverside and clientside.
params can only be set serverside though.

ApothiX 04-26-2006 04:31 PM

Quote:

Originally Posted by xAndrewx
params can only be set serverside though.

I don't think that's true. I'm pretty sure params can be set both clientside and serverside, hence the reason you can use artmoney to altar your look on Graal Kingdoms.

xAndrewx 04-26-2006 05:22 PM

Quote:

Originally Posted by ApothiX
I don't think that's true. I'm pretty sure params can be set both clientside and serverside, hence the reason you can use artmoney to altar your look on Graal Kingdoms.

Ah yes, my mistake :p


All times are GMT +2. The time now is 09:34 PM.

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