The Daily Click ::. Forums ::. Klik Coding Help ::. How to spawn objects with a value from another on the go
 

Post Reply  Post Oekaki 
 

Posted By Message

hide



Registered
  20/01/2015 17:06:14
Points
  2
20th January, 2015 at 20/01/2015 17:44:38 -

Hello,
I'm trying to spawn text ("Chaîne") over an object ("Actif") with the given alterable value (named "ID" here), i simply cycle through all "Actif" while giving them an incremented number by the loop and spawn the text but it don't show the text at all.

Here is a couple screens that may tell a lot more :

The scene
Image

And the Event List Editor
Image
The disabled part 5 make the text but doesn't set any value, it stays to the default value...

Feel not intuitive at all, i'd have thought the part 4 worked better but it doesn't at all.

Could anyone help ?

EDIT: Sorry, i found how to post on the clickteam forum, so i asked there. => http://community.clickteam.com/threads/90647-How-to-spawn-objects-with-a-value-from-another-on-the-go?p=652906#post652906
If i get an answer before here i'll post the solution here too.

Edited by hide

 
n/a

hide



Registered
  20/01/2015 17:06:14
Points
  2
21st January, 2015 at 21/01/2015 16:49:37 -

The way it's done :
Image
It's under the object->count


 
n/a

The_Antisony

At least I'm not Circy

Registered
  01/07/2002
Points
  1341

VIP MemberStarSnow
24th January, 2015 at 24/01/2015 04:01:05 -

Problem was your loop event.
Spread value already set the ID correctly, but in the loop, you've set the ID in every Active Object to the LoopIndex overwriting the spread value.

I like how you used the loop index instead of using spread value. Easiest way to create each of the string objects would be with a loop anyway.

Upon Pressing Right Arrow +
Active Alterable Value ("id")>=3 +
Active Alterable Value ("id")<=6 :
Active -> Set Xpos to Xpos("Active")+16

^^An event like this will select ONLY the Actives with an ID that falls between 3 and 6. When the right arrow key is pressed, all four Actives with the correct ID will move 16 pixels to the right. It's just an example. You can pick actives by ID equal to a specific number, or a loopindex too.

Just gotta be super careful not to call events in the Active directly unless you mean to intentionally affect every Active.

Edited by The_Antisony

 
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
   

Post Reply



 



Advertisement

Worth A Click