Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching behaviour with Lingo?!

Status
Not open for further replies.

THKPT

Programmer
Jun 29, 2003
3
PT
Hi,

I have a script that I want to attach a behaviour to a sprite dinamicly with Lingo. How can I do that? The behaviour as several property elements

I've tried the next with no sucess
sprite(mapSprite).member = member("map_crop")
sprite(mapSprite).puppet = true
scriptTemp = new(script "zoomInOut", 25, 740, 540, 80, 80, 400, 300, 530, 530)
sprite(mapSprite).scriptList.append(scriptTemp)

I have no idea what so ever of what to do :(

Please give an hand :)

Thank you in advance
 
Use
Code:
scriptInstanceList
instead, as you cannot modify
Code:
scriptList
in the way you tried. You can modify the behaviours attached to a sprite by using
Code:
setScriptList
, but this cannot be used for attaching a script to a sprite.
Code:
--
sprite(mapSprite).scriptInstanceList.add(scriptTemp)
--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top