Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-25-2008, 12:23 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Showimg

Well, I'm trying to show an image, but there's some sort of strange problem ---> the image just won't show oO
Everything else in the event works fine, and it's all serversided..


PHP Code:
function onActionServerSide() {
  if (
params[0] == "EventStart") {
    
serverr.event true;
    
serverr.eventlevel params[2];
    
serverr.eventx params[3];
    
showimg(185"event_icon.gif"screenwidth/2screenheight/2); 
    
serverr.eventy params[4];
  }

Reply With Quote
  #2  
Old 12-25-2008, 01:08 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
showimg() is a clientside function, I believe.
Reply With Quote
  #3  
Old 12-25-2008, 01:19 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Codein View Post
showimg() is a clientside function, I believe.
Negative. Though screenwidth and screenheight are clientside. Also, the default layer of showimg() is 1 as far as I know, so you would basically have to change it with changeimgvis() to get it in the center of the screen, but I suppose you can only use layers 0 to 3 on the serverside.
Reply With Quote
  #4  
Old 12-25-2008, 01:24 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by Crow View Post
Negative. Though screenwidth and screenheight are clientside. Also, the default layer of showimg() is 1 as far as I know, so you would basically have to change it with changeimgvis() to get it in the center of the screen, but I suppose you can only use layers 0 to 3 on the serverside.
Oh, sorry. Atleast I've learnt something new
Reply With Quote
  #5  
Old 12-25-2008, 01:35 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Well.
It's serverside, but if screenheight and screenwidth are clientside (which is logical), shouldn't this be working?

" showimg(1, "event_icon.gif", 30, 30); "

well it isnt xD
Reply With Quote
  #6  
Old 12-25-2008, 01:50 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
You need
HTML Code:
changeimgvis(1, 1);
i think
Reply With Quote
  #7  
Old 12-25-2008, 02:46 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
I can't get showimg() to work serverside at all, for some reason. Even with changeimgvis().
Reply With Quote
  #8  
Old 12-25-2008, 02:58 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Your problem is that you're displaying the image on screen coordinates divided by half, which in 800x600 would be at x400 and y300, which is outside the level boundaries (64x64). If you're on a GMAP you should see the image a few levels south east

EDIT: I'm fairly sure showimg() works serversided in local NPCs, doubt it will work when done in a wNPC though.
__________________
Follow my work on social media post-Graal:Updated august 2025.

Last edited by xXziroXx; 12-25-2008 at 03:19 PM..
Reply With Quote
  #9  
Old 12-25-2008, 04:13 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
So it won't work serversided in WNPCs..
mhmkay, thanks to everyone that answered
Reply With Quote
  #10  
Old 12-25-2008, 06:38 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Pelikano View Post
So it won't work serversided in WNPCs
*facepalm*
Reply With Quote
  #11  
Old 12-27-2008, 03:49 AM
[email protected] zeektheman2@hotmail.com is offline
SirZeek
Join Date: May 2008
Posts: 37
zeektheman2@hotmail.com is on a distinguished road
You don't have to do everything serverside. You could set a string serverside and check clientside to see if its true and if it is, it could show the image.
Reply With Quote
  #12  
Old 12-27-2008, 12:15 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
that's exactly what I'm doing now
Reply With Quote
Reply


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 03:22 PM.


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