User Tag List

Results 1 to 5 of 5

Thread: Best way to change certain of same object to have different value?

  1. #1
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)iOS Export Module (Steam)Firefly 3D Module (Steam)
    KookieKooker's Avatar
    Join Date
    Feb 2016
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Best way to change certain of same object to have different value?

    Basically let's say this:

    My game is a platformer, and the game will have chests that either hold tokens or upgrades.

    Now what I can do is place the chest down and scope it by getting it's exact X and Y, that would work, but is there a better way to do this? What if I have to adjust the level a bit or the chest location a bit? Do I really have to go back to the code and change the X and Y of the specific chests each time?

    One thing I've been thinking about is using ForEach and setting the ID individually, but I don't know how it orders it, Like for example is it from left to right or from layer order or..?

  2. #2
    Forum Moderator

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    nivram's Avatar
    Join Date
    Jul 2006
    Location
    Bandon, Oregon
    Posts
    6,755
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Can you not use a random code to place the chests? That way the random code is already in your coding.

    Marv
    ​458 TGF to CTF 2.5+ Examples and games
    http://www.castles-of-britain.com/mmf2examples.htm

  3. #3
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)iOS Export Module (Steam)Firefly 3D Module (Steam)
    KookieKooker's Avatar
    Join Date
    Feb 2016
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh, huh, yea you're right, thanks! Just one of those times I failed on thinking outside the box, haha.

  4. #4
    Clicker

    Fusion 2.5Android Export Module

    Join Date
    Jan 2007
    Posts
    277
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Another thing to consider is if you want to place specific items in specific chests . . . . EG

    Chest 1 Always has tokens in it
    Chest 2 always has an upgrade
    Chest 3 always has an upgrade
    Chest 4 has a sword

    Instead of trying to "insert" items via code you could create active objects, that are invisible at start, that represent these items. Place them over the chest in the level editor. At the start of the frame start a foreach loop for each chest then write the object that's overlapping its information to the chest and destroy the object.

    An example is attached. Mouse over a chest to see whats inside. Click the chest to spawn that item.
    Attached files Attached files

  5. #5
    Clicker

    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)iOS Export Module (Steam)Firefly 3D Module (Steam)
    KookieKooker's Avatar
    Join Date
    Feb 2016
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Huh, that's also a very clever way of doing it, thanks for another cool solution!

Similar Threads

  1. Size change on object
    By Zido in forum Fusion 2.5
    Replies: 2
    Last Post: 8th January 2020, 12:15 AM
  2. Is there any way to change an object on all frames at once?
    By Warmachine in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 24th February 2014, 11:39 AM
  3. How can I change the depth of an object?
    By emberjed in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 6th October 2012, 10:18 PM
  4. Object change layers?
    By kungsangun in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th February 2008, 08:50 PM
  5. [request:]ping object? &small change to FTP object
    By DarkSmurf in forum Extension Development
    Replies: 1
    Last Post: 26th September 2007, 09:33 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
  •