User Tag List

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

Thread: Is there a way to have different starting values for copied objectes?

  1. #1
    No Products Registered

    Join Date
    Jun 2015
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is there a way to have different starting values for copied objectes?

    I am making a game in which there are villagers around the town you can talk to. How I planned to do this was to put a text box on my screen, and when the player clicked a villager, that villagers first alterable string would be coppied into the text box. But it seems that when I copy them, and change one of the villagers strings they all change. So my question is, is there a way to copy an object, so all the stuff I programmed for it is the same, but I can change only one of their strings or values at a time?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    495
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    This is actually pretty easy. If all your villagers are the same kind of object, give them a "randomSaying" alterable value. At the Start of the Frame, set their "randomSaying" to a Random value within the total number of things you want NPC's to be able to say. You can then code them into the text area using the "Change Alterable String" method in the event editor, specifically for the text box, not for the NPC itself. When you talk to an NPC, and their randomSaying value = whatever, change the text box's alterable string to read as that saying.

  3. #3
    No Products Registered

    Join Date
    Jun 2015
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So what if I want an RPG game where maybe one MPC always says "Hello", and some might say usefull stuff. So basicly, where I can decide what each villager says. For example, I could put a villager by a closed gate that says "Sorry, you can not pass."

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    495
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    For that you will probably want a cloned NPC instead of a duplicated one and control them with individual code as opposed to the random sayings.

  5. #5
    No Products Registered

    Join Date
    Jun 2015
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Aww man. I was hoping there would be a way to make something like "If Clicked with Left Mouse Button, Then Set List "NPC Chat Box" to "NPC String 1". Which would be for all NPCs, and all I would have to do is change their first string each time I put a new NPC in.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    This can be done,
    all you have to do is creating NPCs on runtime (not duplicating them in the frame window),
    and on creation, assign each NPC the alterable value of your choice.

    Simple example:

    start of frame
    ---> create NPC
    ---> set NPC at (shop position)
    ---> set NPC alt. string to "Hello, may I help you?"

    start of frame
    ---> create NPC
    ---> set NPC at (gate position)
    ---> set NPC alt. string to "Sorry, you cannot pass"


    Obviously this is open (and particularly useful) in procedural structured RPGs,
    when you have your database of NPCs/values/strings,
    and create them with single actions by looping the database + adding each its own values/strings.

    Side note:
    for few NPCs and small frames you may better go with different NPCs as dsilvers said,
    and maybe add them to the "NPC" qualifier, for using a single event like:
    onclick "qualifier" -> set text box to "qualifier" alt. string

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    495
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    A qualifier would certainly be a great way of organizing NPC's, especially if they are going to say different things depending on their job, and then you can do things like attach helmets or change their clothing color too!

  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,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Hey dsilvers,
    I take advantage of your last comment,
    because I have a somewhat similar situation in one of my projects (the most overwhelming one )
    and I guess you have a good expertise on playing with colors.

    I was looking for a quick and decent way to recolor selected parts of my characters,
    to resemble different dressing-armours,
    without having to draw a whole set of new animations for each character*movement*direction etc..

    As far as I know, the colorpick + color replace solution is a little painful (consider having lots of different characters and starting colors for each!)

    Maybe some kind of selective masking... to gray-scale everything except the head/hands for a "iron armour"...?

    Any brilliant idea on this peculiar need?

    edit: attaching external objects is unsuitable due to the fact a dress-armour would also cover arms and legs,
    and then a static piece would feel wrong over moving arms-legs (while for helmets and weapons I've chosen that way)

  9. #9
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleMac Export Module
    dsilvers's Avatar
    Join Date
    Jun 2008
    Location
    Boston, MA
    Posts
    495
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Hey schrodinger,
    Brash Monkey's Spriter could help you in that situation. It would help you set up your characters to wear all different kinds of armor, then export those animations individually so you can snap them in place on your character. The extension by conceptgame is apparently set up to act as an alternative to Active objects, and Spriter controls all the pieces: http://community.clickteam.com/threads/91759-Beta-Spriter-Object-Extension?highlight=spriter

    If you then wanted to color the armor dynamically, you could set the RGB Coefficient of each piece depending, say, on its rarity, or I've seen some neat things done with the eyedropper object. You might be able to select colors only within a range with it and leave some other colors alone, letting you have some parts of the armor get colorized while the rest stay as is.

  10. #10
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    These are really interesting solutions.

    I was going to give a try to Spriter, as it seemed to be interesting (particularly for this project).
    If I understand correctly, Spriter would help me animate characters in order to have them all moving in similar ways,
    with given "hot-spots" for arms joint etc. in equal positions for all of them,
    so that an "animated piece of armour" would then suit well for all of those similar shaped characters.

    Coloring on range could also be worth a try,
    but I guess I'd have to pre-store which color-ranges to replace for each different character.

    I'll definitely check both in depth!

    Thank you

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Can an object be copied to another frame?
    By RetroRain in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 11th March 2011, 06:57 PM
  2. Need to control copied objects individually
    By Bernardo3D in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 3rd October 2009, 12:18 AM
  3. Multiple Hit Kills on Copied Enemies?
    By Jellyhead365 in forum The Games Factory 2 - Technical Support
    Replies: 3
    Last Post: 18th December 2006, 09:08 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
  •