Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   gani scripting problem (https://forums.graalonline.com/forums/showthread.php?t=134256537)

sssssssssss 10-18-2009 07:56 PM

gani scripting problem
 
Before anyone says anything, i know sleep is bad, i was just trying everything i could think of. Whats wrong with this script? the gani will not show up. dont know how to make it work.

PHP Code:

// NPC made by Cyril Dionne (SDE)
function onCreated(){
  
this.setimage("armageddon-door.png");
}

function 
onPlayerTouchsMe(){
  
this.setimg("");
  
this.setcharani("armageddondoor.gani","null");
  
sleep(5);
  
this.setcharani("","null");



DustyPorViva 10-18-2009 08:04 PM

you don't include the .gani part in setCharAni.

sssssssssss 10-18-2009 08:38 PM

PHP Code:

// NPC made by Cyril Dionne (SDE)
function onPlayerTouchsMe(){
  
setcharani("armageddondoor",null);


still not working.
dunno, but it looks like the npc image is hiding it. not sure.

fowlplay4 10-18-2009 09:10 PM

Check your gani file, and the folder rights and configuration on your server.

DustyPorViva 10-18-2009 09:15 PM

You shouldn't mix and match images and ganis like that. If you're going to use ganis, use them consistently throughout the NPC.

sssssssssss 10-19-2009 06:51 AM

ok, so i just did it in gs1, simple
if playertouchsme setcharani 0, gani;
it works, but the problem is the gani is blank. actually it shows the npc char instead, which isnt even in the gani at all.

so.... for some reason the gani is blank. Its not when i try it offline in graalshop. any ideas?
all the images in the gani are also in the images folder on rc, the gani is in a gani folder. Ive also tried putting the images for the gani in the gani folder too, nothing changes.

sssssssssss 10-20-2009 08:01 AM

Anyone have any ideas on this? A simple setcharani wont even work, the stupid red suit newbie is the only thing that shows up in the gani online at all. -_-

DustyPorViva 10-20-2009 02:43 PM

if (playertouchsme) setcharani armageddondoor,;

Should work fine offline. It's hard to say though, you haven't provided a gani.

sssssssssss 10-20-2009 09:29 PM

1 Attachment(s)
Oh sorry. Bit out of my mind lately. I read that you have to have the images in the same folder as the gani to test offline, so here is a zip.

again, i used that, it wont work. I did that in gs2 online as well, wont work. Its empty, at least I think, for whatever odd reason. It's been a good 5 years or something since I touched a gani, so probably something easy im missing.

Switch 10-21-2009 02:50 AM

1 Attachment(s)
this.dir = 2;

Make sure if you do a Gani such as this where you only want one direction that you change "Single dir" to "true" in the right bar to eliminate having to set the NPC's direction, and make sure nothing else is setting the NPC back to it's old Gani.

sssssssssss 10-22-2009 10:53 PM

Its just going blank now.
the only thing the leven npc has is the door image in the image section for npcs, and this:

PHP Code:

//#CLIENTSIDE
function onPlayerTouchsMe(){
  
setcharani("armageddondoor"NULL);


Still just blank though. I double checked for the thousandth time, but the sound in the gani is in the sound folder for the server online, and the images for the gani are in the images folder for the server online, and the gani is uploaded as well.

any other ideas? It is on the gmap, if that matters at all.

Admins 10-23-2009 01:20 AM

The find command showed
ganis/armageddondoor.gani: not downloadable
The folder configuration was slightly wrong, all folders there must be relative to the levels folder.

I'm wondering if it should be possible to add folder configuration lines like "file */*/*". The server is scanning all levels/ folders anyway.


All times are GMT +2. The time now is 02:08 PM.

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