Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   GS2 equivalent of || (OR) in functions (https://forums.graalonline.com/forums/showthread.php?t=134270542)

maximus_asinus 08-31-2017 12:21 AM

GS2 equivalent of || (OR) in functions
 
I feel sort of stupid for asking this, but I have four or five functions that call on one function. In GS1 I would have been able to do something like:
PHP Code:

if (playerEnters || playerTouchsMe || washitcustomFunction(); 

Can I express this in a similar way in GS2?

MysticalDragon 08-31-2017 12:39 AM

I don't think you can use || with the functions like you could in GS1
I would do

function onPlayerEnters() customFunction();
function onCreated() customFunction();
function onWasHit() customFunction();

maximus_asinus 08-31-2017 12:49 AM

Quote:

Originally Posted by MysticalDragon (Post 1741889)
I don't think you can use || with the functions like you could in GS1
I would do

function onPlayerEnters() customFunction();
function onCreated() customFunction();
function onWasHit() customFunction();

that is what I figured, thanks for the quick reply regardless


All times are GMT +2. The time now is 08:04 AM.

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