Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-23-2010, 07:35 PM
AlexanderK AlexanderK is offline
Registered User
AlexanderK's Avatar
Join Date: Mar 2006
Location: Germany
Posts: 79
AlexanderK is on a distinguished road
Send a message via MSN to AlexanderK
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.
Reply With Quote
  #2  
Old 07-23-2010, 07:37 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
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.
Reply With Quote
  #3  
Old 07-23-2010, 07:51 PM
AlexanderK AlexanderK is offline
Registered User
AlexanderK's Avatar
Join Date: Mar 2006
Location: Germany
Posts: 79
AlexanderK is on a distinguished road
Send a message via MSN to AlexanderK
Thank you! It finally works.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:09 PM.


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