The Daily Click ::. Forums ::. Klik Coding Help ::. Lights...
 

Post Reply  Post Oekaki 
 

Posted By Message

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
25th May, 2007 at 06:46:30 -

Ok so... I've got duplicates of a torch object. I want to run a loop at frame start to make lights on them. This is the code I have:

Image

It only create 3 lights and puts them on 3 torches... I'm not sure as to why but maybe someone here can help?

I have tested with more and less torches and 3 seems to be all it can manage...

 
Image
http://bfollington.tumblr.com

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
25th May, 2007 at 06:54:19 -

* Start of level
- Destroy "light"
- Start loop "makelight" NObjects("torch") times
- Spread value 0 in Value A of "torch"
- Spread value 0 in Value A of "light"

* On loop "makelight"
- Create "light" at (-300, -300)

* Start of level
- Start loop "lights"

* On loop "lights"
* Value A of "light" == LoopIndex("lights")
* Value A of "torch" == LoopIndex("lights")
- Light: Set position to (0,0) relative from "torch"


Keep in mind that the actions/events have to be placed in that particular order. The third event needs to be kept separate from the first, due to an MMF bug. You can also position the "light" objects using this code:

* Start of level
- Light: Set position to (0,0) relative from "torch"


Image Edited by the Author.

 
n/a

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
25th May, 2007 at 07:04:49 -

Thanks a lot axel! !

 
Image
http://bfollington.tumblr.com
   

Post Reply



 



Advertisement

Worth A Click