Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Classes & Imgs (https://forums.graalonline.com/forums/showthread.php?t=57886)

KuJi 03-01-2005 10:06 PM

Classes & Imgs
 
Err, why isn't this working? (Its a class)

if (created) setimg block.png;
//#CLIENTSIDE
//Everything else is down here etc..

It stay's the image that the npc get's from the level editor instead of going to block.png

falco10291029 03-01-2005 10:14 PM

because if (created) is a clientside only flag

Evil_Trunks 03-01-2005 10:16 PM

Quote:

Originally Posted by falco10291029
because if (created) is a clientside only flag

falco please don't ever post again


Quote:

Originally Posted by KuJi
if (created) join block;

join is not meant to be used in any events

Quote:

Originally Posted by falco10291029
Quote:

Originally Posted by ProjectShifter
Because there is no actual creation of the NPC serverside, you can not do if (created) on the serverside,


that's ProjectShifter for you

KuJi 03-01-2005 10:17 PM

if (created) isn't a clientside only flag.

Because, if it was. It wouldn't even join the class, now would it?

if (created) join block;

falco10291029 03-01-2005 10:17 PM

Um, no?

KuJi 03-01-2005 10:18 PM

? Alright I am going to do what you said, I will bet you 1000$ it won't work.

KuJi 03-01-2005 10:19 PM

Hey, what do you know? It didn't work, k bye.

Set img won't work at all in classes for me, unless clientside.

falco10291029 03-01-2005 10:24 PM

Quote:

Originally Posted by Projectshifter
Because there is no actual creation of the NPC serverside, you can not do if (created) on the serverside,

That's where i learned that if crated wouldnt work serverside. Excuse me for being misinformed Evil_Trunks (and btw it never works for me serverside anyway except in putnpc2 npcs or a class npc).

KuJi 03-01-2005 10:28 PM

Alright then, how come it can't change the image at all then?

KuJi 03-01-2005 10:33 PM

Alright, I think I got it to work. When the npc has an image under the editor, it can't be switched through a script serverside on a class :o

If (created) works tho

Gman4pwnu 03-02-2005 05:28 AM

Quote:

Originally Posted by Evil_Trunks
falco please don't ever post again

<3

Lance 03-02-2005 11:04 AM

How many times do I need to remind people to not post bad scripting advice?

One more, it seems. I remind you that consistently posting bad scripting advice results in the inability to view/post in the scripting forum.

Evil has the right idea about your problem, KuJi.

Kaimetsu 03-02-2005 11:34 AM

Kuji, 'join' is not really a command per se. It is processed long before the script is executed and, at that point, it is simply replaced by the contents of the specified class. If your script does not work, think about what it would look like after that replacement.

KuJi 03-04-2005 04:23 AM

Did I not say I fixed the problem? Or maybe, I thought I said it and I thought I posted stating that but other's don't see it. Also, you can close the thread now.

Lance 03-04-2005 07:22 AM

Quote:

Originally Posted by KuJi
Also, you can close the thread now.

For what reason?

Kaimetsu 03-04-2005 08:42 AM

Quote:

Originally Posted by KuJi
Did I not say I fixed the problem?

I was not helping to fix the problem, I was helping to dispell your ignorance. You had not yet assured me that it had already been done.

Admins 03-04-2005 04:23 PM

I don't understand a lot here ... the only thing i could imagine is that block.png is not existing, so the server doesn't allow the npc to switch to that image.

KuJi 03-04-2005 10:06 PM

Well, I prolly spelled if (created) wrong or something. It works now lol.


And I was saying close it, cause the problem was solved.


All times are GMT +2. The time now is 07:59 PM.

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