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 02-24-2008, 06:18 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
Ganiscript parameters?

Hi,

how can i read the params passed to a gani with the script inside the gani?
i tried PARAM1, params array, attr array :/

or how can i pass params to a showani gani script?
__________________
Reply With Quote
  #2  
Old 02-24-2008, 06:39 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
There are two ways:
- if you use GS1-style (if (playerenters)...) then you can access the parameters at any time by params[]
- if you use GS2 then you get the parameters on the first call to onPlayerEnters(), but you need to check if the parameters actually exist because onPlayerEnters() is also called when you enter other levels:

PHP Code:
function onPlayerEnters() {
  if (
params.size()>0)
    echo(
"first parameter: " params[0]);

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


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