User Tag List

Results 1 to 6 of 6

Thread: Its 2022 , i still on scoping problem

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2017
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Its 2022 , i still on scoping problem

    Hi all,

    Im designing a simple action side scroller game, with enemy using state machine. I use alterable string state and change this string value when condition is met. My question is, i always has weird result since i know this state comparison method is too near to the "comparing two general values" trap.(Enemy01 State="Idle").Using ForEach when comparing the state yield better result. Can it be concluded that comparing general value is better done using loop?Im trying to grasp the concept here and hope it is not just a random luck.

    Thanks

  2. #2
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleFirefly 3D Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    fnkycoldmadeanr's Avatar
    Join Date
    Jul 2017
    Location
    Melbourne, Australia
    Posts
    285
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    compare to general values does not scope
    Use Active>compare to alterable string
    Uppernate has a handy guide on ClickConverse Discord if you are on there

    https://discord.com/channels/1905521...34538047176784

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2017
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im pairing a collision sprite with animated sprite for enemies

    Upon creation i gave the enemy the fixed value of the collision sprite.

    The collision sprite has alterable string state and initialy start with "idle"

    My question now is, how can i check value for each of the collision sprite and the matching animated sprite to animate accordingly?

    Do 1. Collision sprite alterable value="Idle" is enought to scope string value or i need for each loop?
    2. How do i get the matching animated sprite with in 1 after that? Should i go for another loop?

    Iam confused.Pls help.Thanks

  4. #4
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,128
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    If the state is on the parent object, the for each loop should be for the parent, then you can scope the child objects, which should store the fixed value of the parent.
    Then you can easily check what's the parent state and do whatever you want with the child objects.

  5. #5
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2017
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, im trying to get the concept. Which method for the one i mention above

    1. Collision sprite="Idle" Then Directly Get AnimatedSprited ID=Retrieve Fixed Value

    OR

    2. Run For Each Collision sprite, Collision sprite="Idle" Then Get AnimatedSprited ID=Retrieve Fixed Value

    CF consist of manual and autoscope really hit me hard in brain.hahaha.TQ

  6. #6
    Clicker Fusion 2.5 (Steam)

    Join Date
    Sep 2017
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind, More or Less i get it already

Similar Threads

  1. Basic Question on Scoping
    By hoyoyo80 in forum Fusion 2.5
    Replies: 3
    Last Post: 28th August 2020, 03:27 PM
  2. problem scoping my counters
    By Heetee in forum Fusion 2.5
    Replies: 0
    Last Post: 29th March 2020, 12:08 PM
  3. Scoping timer events? How to do?
    By Manuel in forum Fusion 2.5
    Replies: 3
    Last Post: 23rd June 2019, 01:37 PM
  4. Scoping issue
    By Darkhog in forum Fusion 2.5
    Replies: 1
    Last Post: 20th May 2017, 11:05 PM
  5. The object scoping problems
    By Shivek in forum Fusion 2.5
    Replies: 4
    Last Post: 5th August 2015, 10:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •