PDA

View Full Version : GS2 equivalent of || (OR) in functions


maximus_asinus
08-31-2017, 12:21 AM
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:

if (playerEnters || playerTouchsMe || washit) customFunction();
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
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