uid confusion

0 favourites
  • 3 posts
  • This part works

    [patol Logic] - basically - on collision set mirror = 0 when moving right - 1 if moving left <-- works perfectly

    This part is borken...

    on creation -- enBox
    	[li]spawn object rdSlime[/li]
    	[li]set rdSlime.nestUid = enBox.UID[/li]
    	[li]set enBox.hostUid = rdSlime.UID[/li]
    system - compare 2 variables (enBox.hostUid = rdSlime.nestUid
    --- sub - enBox.mirror = 0
    --rdSlime - set not mirrored
    --- sub - enBox. mirror = 1
    --rdSlime - ser mirrored[/code:3j59mj14]
    my question - how do i make a specific enBox object - choose it's specific rdSlime object - so the code I run only affects those two objects?
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Looks like you're not actually picking any objects. Just associating UID's is not enough. You're comparing enBox.hostUid = rdSlime.nestUid but at that moment, all enBox's and all rdSlime's are picked. Look into running a For each enBox loop around the system - compare, and inside the loop pick rdSlime by enBox.HostUid. If you had the full version, a Container would do the trick.

  • I do own the full version - and from what I've seen of containers - they won't actually work for my purposes - unless I missed something - you can only have each object in one container, and I'm trying - failing - to make complex systems based off of a single object/family that affects a large amount of other objects...

    in this case, I'm having the enBox as the only object that performs calculations, but has an assosciated enemy object pinned to it

    this enemy spawned is chosen by type in an instance variable - given a roll for "elite" at run time, an left on its merry way - running w/e behavior groups the instance it spawned has set enabled

    -- this means I'll only need one all-inclusive enemy sheet - witch means - I can progress...

    however, it all starts with figuring how to make a specific object choose another specific object

    --for each enBox
    -system pick by comparison -- pick rdSlime - where redSlime.nestUid = enBox.hostUid - - reversing it has no change
    --- sub - enBox.mirror = 0
    --rdSlime - set not mirrored
    --- sub - enBox. mirror = 1
    --rdSlime - ser mirrored[/code:16f1q3z9]
    doesn't work =[
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)