The Daily Click ::. Forums ::. Klik Coding Help ::. Alterable value by number
 

Post Reply  Post Oekaki 
 

Posted By Message

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
6th May, 2010 at 21:37:43 -

This may be a strange question but i have a loop where i would like to pull an alterable value which is in condition set by loop index into a string.

I used the loop indexed alt vals in the same condition, it worked great for what i used it, but now i just want to juicy it up a bit, if anyone doesnt know what im talking about its when u press edit in expression editor when doing condition to alt value, you can set a number of the alt val instead of picking a defined alt value.

But how can i do that in the expression editor in action, where i cannot set alt value to be picked by loop index, is there any command in the expression editor to get to it.? Or isnt? dunno if this makes much sense.


 
Code me a sausage!

Xgoff



Registered
  22/02/2009
Points
  135
6th May, 2010 at 22:10:17 -

AltValN( "OBJECT", loopindex("whatever") ) ?

Edited by Xgoff

 
Image

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
7th May, 2010 at 00:13:11 -

Nope, that doesnt work.
By the way im using mmf2. I just want to determine an alt value by a number instead of a name in the action.

Edited by Don Luciano

 
Code me a sausage!

~Matt Esch~

Stone Goose

Registered
  30/12/2006
Points
  870

VIP Member
9th May, 2010 at 16:35:42 -

Make sure you have updated MMF2 to the latest stable release R248. I can't remember when this functionality became available but I am sure it doesn't come with the version you'll find on a cd or in the demo. You can then choose an alterable value by index in the alterable values menu.

AltValN( "ObjectName", IntegerIndex ) is the correct syntax.

 
http://create-games.com/project.asp?id=1875 Image


Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
9th May, 2010 at 17:44:56 -

I think perhaps you're all talking about retrieving a value, which is not what he's looking for.
As far as I know, you cannot set a value by index, but I could be wrong.

 
n/a

Hernan



Registered
  04/03/2003
Points
  707

VIP Member
9th May, 2010 at 20:20:54 -


Originally Posted by Sketchy
I think perhaps you're all talking about retrieving a value, which is not what he's looking for.
As far as I know, you cannot set a value by index, but I could be wrong.


Sure you can. When setting the alterable value, there is a big button next to the alterable value dropdown box saying "use expression"

 
This space is for rent

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
9th May, 2010 at 21:33:33 -

OMG. Where did that button come from, and how have I not noticed it before?!
I feel kind of silly now

Anyway, if that doesn't do it, nothing will.


 
n/a
   

Post Reply



 



Advertisement

Worth A Click