Is there a way to use an alterable variable to select an object?
I have several objects - obj1 obj2 etc.
Can I set the trigger condition something like:
collision set ValA=2
ValA=2 then move "obj"+ValA
ValA=3 then obj3 etc.
I hope this makes sense.
Printable View
Is there a way to use an alterable variable to select an object?
I have several objects - obj1 obj2 etc.
Can I set the trigger condition something like:
collision set ValA=2
ValA=2 then move "obj"+ValA
ValA=3 then obj3 etc.
I hope this makes sense.
You can put them all in a qualifier and give them all the an alterable value that is the Type of that object, no matter which instance it is. Then you can just compare the qualifier's alterable value to the object type you want. ;)
Whoa LB - you sure do have creative solutions. I will have to play with this one for a bit to actually get clear what you mean ;)
Like...?
obj1 obj2 ojj? - all set as group.friends
val obj1 = valA=1
val obj2 = valA=2
etc.
val(group.friends) = 2, then "stuff done to obj2" will happen.
______________
I was specifically working with StringParser
condition = ObjDirection(Val(listGetAt$( "Parse 2", NUM( "red" ))))
So, I want to toggle "Parse 2"
I have seen something like "Parse "+ValA+",
and have tried any number of permutations along these lines. Doop.
I wonder if the above will work for that?
I'm not sure what you are getting at with string parser...could you elaborate?
Sorry if this is not clear.
I have in fact resolved the Parser issue - now seeing that I can switch strings on the fly.
BUT...
the issue remains.
How to insert a variable into an object reference in either a condition or action? I code in PHP and am used to using {$variable} or [$variable]. Can this be done in MMF?
In the example above the object is the String Parser. I trying to use an incrementing value to switch to the next object. The principle could apply to any set of objects in numerical series - that needs to be selected specifically - not sequentially or randomly.
I hope this makes more sense.?
thanks
It is not possible*. You must use the workaround I suggested.
[size:8pt]*With Create By Name already out, perhaps Dynasoft could get Select Object Extension to select objects by name. ;)[/size]
Thanks LB.
I have another one - create object(valX) at...
I will make some time to try your earlier suggestion. I am pretty slow with 'developmental' issues but... it is on the list. I am also slow exploring the full range of extensions but will have a peek at 'create by name.' thanks.