Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Help - Showimg (https://forums.graalonline.com/forums/showthread.php?t=134259930)

AlexanderK 07-23-2010 07:35 PM

Help - Showimg
 
I cant get this script I used in the level editor converted and working online in GS2
NPC Code:
if (created) {
showimg 1,treetrunk1.png,x-.5,y-6;
changeimgvis 1,1;
showimg 2,treetop1.png,x-5,y-15;
setshape 1,80,32;
}


This is what I've got so far.
NPC Code:
//#CLIENTSIDE
function onCreated()
{
this.setShape(1,80,32);
showimg(0,treetrunk1.png,this.x-5,this.y-6);
changeimgvis(0,1);
showimg(1,treetop1.png,this.x-5,this.y-15);
}


The images don't show.
Any help would be appreciated. I would glady also approach this in a different way if showimg doesn't work that way in GS2, I just need some directions.

DustyPorViva 07-23-2010 07:37 PM

PHP Code:

//#CLIENTSIDE
function onCreated() {
 
this.setShape(1,80,32);
 
showimg(200,"treetrunk1.png",this.x-5,this.y-6);
 
changeimgvis(200,1);
 
showimg(201,"treetop1.png",this.x-5,this.y-15);


Firstly, you need to surround your strings(words, or anything not numerical) in quotations. Secondly, you want to use an index of 200 and over... since it's clientside, it only needs to show for that player(as each player will get their own instance). Anything under 200 attempts to display the image to all players, and that's only useful for weapons like boomerangs and so.

AlexanderK 07-23-2010 07:51 PM

Thank you! It finally works.


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

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