Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   light/weather/particle effects (https://forums.graalonline.com/forums/showthread.php?t=134260780)

MrOmega 10-10-2010 09:29 PM

light/weather/particle effects
 
What are the names of the checkboxes in the f3 menu for these and can we use them directly to control how our scripts work or are we stuck with waiting till the player closes the f3 menu?

Tigairius 10-10-2010 09:34 PM

Boolean values: lighteffectsenabled, weathereffectsenabled, and particleeffectsenabled.

Example of usage:
PHP Code:

//#CLIENTSIDE
function onCreated() {
  if (
lighteffectsenabled) {
    
showimg(1, this.x, this.y, "light2.png");
  }
} 


Deas_Voice 10-10-2010 09:34 PM

you could use this script to find out what the gui names are, but from that, i dont know, hvnt tested it too much.

Quote:

Originally Posted by Tigairius (Post 1605427)
Boolean values: lighteffectsenabled, weathereffectsenabled, and particleeffectsenabled.

Example of usage:
PHP Code:

//#CLIENTSIDE
function onCreated() {
  if (
lighteffectsenabled) {
    
showimg(1, this.x, this.y, "light2.png");
  }
} 


but if you use that, you would have to reconnect, no?

MrOmega 10-10-2010 09:45 PM

Quote:

Originally Posted by Deas_Voice (Post 1605428)
you could use this script to find out what the gui names are, but from that, i dont know, hvnt tested it too much.



but if you use that, you would have to reconnect, no?

correct, but I currently have to use a timeout, using effect and a another variable ( so it doesn't constantly call the effect to show)

Deas_Voice 10-10-2010 09:52 PM

Quote:

Originally Posted by MrOmega (Post 1605429)
correct, but I currently have to use a timeout, using effect and a another variable ( so it doesn't constantly call the effect to show)

use playerenters event perhaps?
but for effects that you already are using a timeout, u could just add the if's :)

MrOmega 10-10-2010 09:54 PM

Quote:

Originally Posted by Deas_Voice (Post 1605431)
use playerenters event perhaps?
but for effects that you already are using a timeout, u could just add the if's :)

which is what I'm doing, do you by chance know the name of the F3 window? cause I can't find it on the gui explorer

fowlplay4 10-10-2010 10:12 PM

External GUIs like to not belong to any parent objects, so finding the names is a tricky feat.

MrOmega 10-10-2010 10:14 PM

Quote:

Originally Posted by fowlplay4 (Post 1605435)
External GUIs like to not belong to any parent objects, so finding the names is a tricky feat.

So, I have to use Guess and check...?

DustyPorViva 10-10-2010 10:19 PM

for (temp.i : GUIContainer.controls) echo(i.name);

If external windows are a problem, use v5.

MrOmega 10-10-2010 10:28 PM

Well the Options window is still external in V5

DustyPorViva 10-10-2010 10:37 PM

Quote:

Originally Posted by MrOmega (Post 1605440)
Well the Options window is still external in V5

Ya but you didn't ask for that one :P

MrOmega 10-10-2010 10:39 PM

Quote:

Originally Posted by MrOmega (Post 1605432)
do you by chance know the name of the F3 window?

Quote:

Originally Posted by DustyPorViva (Post 1605441)
Ya but you didn't ask for that one :P

Yes sir I did! :P

DustyPorViva 10-10-2010 10:43 PM

Quote:

Originally Posted by MrOmega (Post 1605442)
Yes sir I did! :P

Oh my bad, I was thinking F2, heh... why not just call it the options window? HMMMM? Zero once taught me a way to echo the name of a GUI you clicked on, but sadly that was a long time ago and I can't remember how to do it, heh.

fowlplay4 10-10-2010 10:43 PM

1 Attachment(s)
Options: OptDialogWindow2D

MrOmega 10-10-2010 10:47 PM

Quote:

Originally Posted by fowlplay4 (Post 1605444)
options: Optdialogwindow2d

THANK YOU!

It works!

PHP Code:

function OptWeatherEffectsToggle2D.onAction()
{

  echo( 
OptWeatherEffectsToggle2D.checked);

} 

no more timeout loops!

Twinny 10-10-2010 11:22 PM

If you used universe as a scope, would think that would get everything...maybe


All times are GMT +2. The time now is 10:56 PM.

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