Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 05-06-2011, 09:29 AM
Devil_Lord2 Devil_Lord2 is offline
David K?
Devil_Lord2's Avatar
Join Date: Apr 2011
Location: PA, MD.
Posts: 643
Devil_Lord2 can only hope to improve
Quote:
Originally Posted by cbk1994 View Post
Not sure what you're asking.
For instance, I guess function onPlayerGrabs(){ }
could be made a class that could return true and make the if statement work..

if (onPlayerGrabs()){} "I think could work assuming it is joined to the class"
could return true or false.. I don't know how it works really...

Quote:
Originally Posted by cbk1994 View Post
You can only return one value. Use arrays for returning multiple.
Oh I see.. thanks ^.^;
In the future could they do it with commas to add more, or is there no point?


Quote:
Originally Posted by cbk1994 View Post
Functions return values, not variables. You can assign them to whatever variable you want to.
I've had a function go through all players, and didn't accept externals.
I had it as:
variable
temp.count = 0;

a lot of script...

return temp.count
and
return count

which kept becoming 0 or null... in the end I set it to this.count = temp.count and it finally worked with:

return this.count

I couldn't get it to pass the temp. variable D:
__________________

Digital Media Artist - David K? </3 (UnLoved)
www.davidkrout.com
www.twitch.com/DavidKkz



Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


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