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 05-03-2008, 04:24 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
pass functions/variables/objects by reference

I know about .link() for objects but what about functions?

This is what I'm trying:

Bounce = new TStaticVar("Bounce");
Bounce.easeInOut = function(a,b,c,d) {
return a+b+c+d;
};

function Tween(easefunc,prop,a,b,c,d) {
prop = easefunc(a,b,c,d);
}

Tween(Bounce.easeInOut.link(), this.x.link(), 1,2,3,4);

(Essentially, it's just psuedocode)

But I'm getting all sorts of odd behaviour.

I've tried joining from classes, I've tried function objects, I've tried seperate named functions for everything, no workie.

Any ideas?
__________________

Reply With Quote
  #2  
Old 05-03-2008, 04:27 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Well, I dunno that would work though, since obj.link() is for arrays :o

(At first glance I thought this was a suggestion for passing functions etc. xD)
__________________
Reply With Quote
  #3  
Old 05-03-2008, 04:46 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
... well bugger I. Another case of not reading x-x

well how can you pass stuff by reference?
__________________

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:00 AM.


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