User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Need help making my player a global object

  1. #1
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help making my player a global object

    Hey everyone.


    I have a simple game setup where I have a player object on 1 frame.

    When this player object comes in contact with any object with a 'Obstacle' qualifier, the player will not be able to pass through it.

    I gave the 'Obstacle' qualifier to all objects I don't want the player to pass through.

    This works fine.

    Now I want the player to jump to a new frame when it touches a door object I've made.

    Here's the problem.



    I would like to make it so I do not need to copy the player object over to another frame because it would copy all the events.

    That's fine, but this would mean that if I decided to add more movement options to my player's events, I would need to go to every frame with the player object and manually copy and paste the added events to the player object on each frame.

    As you can imagine, this seems tedious and inefficient.


    I tried cutting and pasting the player's events into the Global Events so I would need to modify the player's events only once, but I got an error saying:


    Paste error

    Cannot paste the events: the origin events contain references to a qualifier.




    I understand qualifiers aren't compatible with Global Events, but I really need a method of having the events of my player stored in one place where I can modify them once and have the changes affect any frame where the player object is in.


    Any suggestions, tips, or answers are very much appreciated!

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    Yakutsk
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    welcome to "no qualifier in global events" club.
    how to solve:
    1. Use 1 frame-based games with level editor.
    2. Use array to store values. (Positions, layers, HP, coins etc.)
    3. Here a trick. Put into a frame active object and rename it EXACTLY as qualifier name. (Contains a bugs)

    personally i prefer 1st method.

  3. #3
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by alexexhowl View Post
    welcome to "no qualifier in global events" club.
    how to solve:
    1. Use 1 frame-based games with level editor.
    2. Use array to store values. (Positions, layers, HP, coins etc.)
    3. Here a trick. Put into a frame active object and rename it EXACTLY as qualifier name. (Contains a bugs)

    personally i prefer 1st method.
    I might go with method 1 as I don't quite understand how I'd go about method 2, and I've heard of method 3 but I don't want to use bugs as they may be patched out fairly soon.

    Are these really the main methods people use? I should be able to do method 1 no problem but this feels a bit strange as I feel I could manage multiple frames far easier.

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    Yakutsk
    Posts
    147
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it's all because you can't use qualifier in global events or behiavours. You're right about managing level in frame editor is quite easier and faster, but, as i said, if you have a lot of frames(each frame is level) you'll soon get annoying with saving and opening your project (it's take time relatively of your level count and object count within)
    * also i didn't sure about that Clickteam Fusion re-use objects in different frames, for example, when you compile your project it will cost size of your application.
    ** also i think
    knowledge acquired when doing the level editor is useful, especially working with arrays and managing data.

  5. #5
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by alexexhowl View Post
    it's all because you can't use qualifier in global events or behiavours. You're right about managing level in frame editor is quite easier and faster, but, as i said, if you have a lot of frames(each frame is level) you'll soon get annoying with saving and opening your project (it's take time relatively of your level count and object count within)
    * also i didn't sure about that Clickteam Fusion re-use objects in different frames, for example, when you compile your project it will cost size of your application.
    ** also i think
    knowledge acquired when doing the level editor is useful, especially working with arrays and managing data.
    I see what you're saying, although I'd still prefer longer loading time on my project when using multiple frames (1 frame per room) over using 1 frame for every level.

    It just sounds so complicated to me, having certain things disabled, other things enabled, layers constantly being turned on and off.

    I guess I'll do some more research in the mean time around the forums and through examples if I can find any.

    If I can't find any better options I'll go with option 1 and lookup methods of doing that.


    If anybody else has any other methods/ideas to share with me, please do so

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    625
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could just put all your player code within a group using qualifiers to simply everything, then copy that group of code to your other layers. Also if you check the property "Global" in the active, it will retain all the alterable value and string information between frames if you have the same active across all frames.

    Of course the 1 frame method is probably the most efficient and optimized way, but it requires a lot of planning ahead with level design using level editors saved in arrays for example. The method above is simpler but if there's any changes to your player code you would need to update it within your other frames. However copying and pasting a group of code isn't too bad. Once you copy the group, you would only have to paste it once within each frame which would only take a few seconds.

    I would only start to build levels after I'm sure all my main player mechanics are designed correctly.

  7. #7
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sumo View Post
    You could just put all your player code within a group using qualifiers to simply everything, then copy that group of code to your other layers. Also if you check the property "Global" in the active, it will retain all the alterable value and string information between frames if you have the same active across all frames.

    Of course the 1 frame method is probably the most efficient and optimized way, but it requires a lot of planning ahead with level design using level editors saved in arrays for example. The method above is simpler but if there's any changes to your player code you would need to update it within your other frames. However copying and pasting a group of code isn't too bad. Once you copy the group, you would only have to paste it once within each frame which would only take a few seconds.

    I would only start to build levels after I'm sure all my main player mechanics are designed correctly.
    Okay well I'm a bit new to this part of Fusion Game Development so I'm going back and modifying almost everything as I go.

    Thanks for the tip on the 'Global' active object though, I think that will come in handy.

    Also, I don't really know about this whole level editor things where it's stored in an array. I would really like having a place to store my player code and I think I would get lost if I had all of my code in one single frame.

    Is there really no other way? To me having a few objects + the player object in one frame and having different objects + the player object in another sounds more simple to manage.

    I can imagine that being far easier than having to constantly enable and disable layers.

    Also I see what you mean by copying a group to be easy. It's really just one item that goes to each frame and that could be a good choice, but it just sounds like a waste of resources and un-organized.

    As I said I change my events all the time so it's really hard for me to build levels afterwards.

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,089
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Just adding another little idea,
    you could also consider not using qualifiers (though I love them and use them everywhere ),
    this could be or could not be a pain, depending on your setup,
    but if you need to have "different kinds" of objects behaving with "same mechanics",
    you could put all the "different kinds" in the same active,
    so it would be different animations x same active object
    instead of different actives x same qualifier

    and of course active objects can be used in global events

    If you don't want to go single-frame, and don't have dozens of frames, I often find that copy pasting group in the end is not that dramatic..
    just make sure you always update all of your frames everytime you modify the group, or keep a revision number in the group so you are sure you always work on the latest group

    Don't know of other ways than the ones already mentioned.
    But 99% sure reading Fusion3 is going so provide much more flexibility for this

  9. #9
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by schrodinger View Post
    Just adding another little idea,
    you could also consider not using qualifiers (though I love them and use them everywhere ),
    this could be or could not be a pain, depending on your setup,
    but if you need to have "different kinds" of objects behaving with "same mechanics",
    you could put all the "different kinds" in the same active,
    so it would be different animations x same active object
    instead of different actives x same qualifier

    and of course active objects can be used in global events

    If you don't want to go single-frame, and don't have dozens of frames, I often find that copy pasting group in the end is not that dramatic..
    just make sure you always update all of your frames everytime you modify the group, or keep a revision number in the group so you are sure you always work on the latest group

    Don't know of other ways than the ones already mentioned.
    But 99% sure reading Fusion3 is going so provide much more flexibility for this
    No Qualifiers, hmmm.

    That sounds really difficult. I took a stab at it and it's making my code a lot more complicated, but I think it might work out.

    I'll have to continue working on it and see how far it goes. I'll get back to this forum later tonight.

    Thanks for the suggestions!

  10. #10
    Clicker Fusion 2.5 (Steam)HTML5 Export Module (Steam)

    Join Date
    May 2016
    Location
    Canada
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm trying so hard to not use qualifiers but it is creating all sorts of bugs that weren't there, and I believe finding another way would save me more time then it would take to re-write loads of code

    I had it so when my player spoke with a piece of paper on the floor, they would have the option to pick it up. If they said yes, the object would be deleted and the player could now proceed with the rest of the adventure.

    Since it's not using the 'Obstacle' qualifier anymore since I want this object to be able to have a 'Behavior' so it will work as is on any frame, the player freezes in place once the game destroys the piece of paper object.

    I believe this is related to the player events that check to see if the player is allowed to move. One of the events is:

    If 'Navigator' (the object the player follows) isn't overlapping:

    Wall
    Wall2
    Table
    Piece of Paper


    I don't know everyone, there has to be some other way that would save me from needing to go back and change so many events and fix bugs.

    Any other ideas? I just want 1 frame per room without needing to duplicate the player's events on to every frame

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Making an object global and the meaning of it
    By AndyBazooka in forum Fusion 2.5
    Replies: 3
    Last Post: 3rd November 2017, 05:10 AM
  2. BUG: making an object global does not update counter images
    By alspal in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 19th August 2013, 10:57 AM
  3. Help - Making global iOS objects
    By Tim in forum iOS Export Module Version 2.0
    Replies: 0
    Last Post: 10th May 2012, 05:44 PM
  4. Making the player Slide with the PMO?
    By Atherton in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 9th December 2009, 09:27 PM
  5. Making player Jump??
    By hendrix in forum The Games Factory 2 - Technical Support
    Replies: 1
    Last Post: 12th May 2009, 05:42 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
  •