mardoch's Recent Forum Activity

  • After some research I finally identify where the problem come from.

    When I try to replace my 3d object's face with a family object, it break it.

    In the end, if I have more than one object in my family it won't work and it will only accept one object.

    So if anyone knows how I can fix this, I will be really thankful!

  • Hi GeoffB! Yes, I know this subject is still about 3D objects and their sprites, maybe I should continue this on the previous topic.

    But my problem is slightly different this time, as I can't use containers. As we know, families can't be used for containers so using parent UID fits more with this, as I want my picked sprite to be different with some conditions.

    So yes, containers are greats but it can't work in this case.

    So I create the correct sprite according to a specific instance, like:

    -> System: Create object NME_Top.ObjectTypeName&"_Sprites" on layer "HiddenSprites" at (700, -100), create hierarchy: False, template: ""

    but the 3D object doesn't pick the correct sprite. Even if I use an instance UID comparison.

    My main problem this time is to use a sprite from a family, so I don't need to create a specific 3D object for each enemy I want to spawn.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello everyone,

    I have an issue actually with my game and can't figure it out. Maybe my method is not the easiest one for what I want to do but here are the facts:

    I have a family object created for each of my enemies name "NME_Top". It's a simple 2d sprite where I can put all my behaviors and instances so I can edit each one easely.

    Then for each of my "NME_Top" objects there is a 3d object created over it named "NMETop_3D". It's the same for every "NME_Top", it purpose is only to display the ennemy sprite on the right face. The sprites are in a family named "NME_Top_Sprite"

    So first I call a function to create both my 3D object but also the right sprite from the family.

    The function itself is quite simple, I set the variables for the 3D object and the sprite object so they can match with the right "NME_Top" object.

    Then when the function is called and the 3D object and sprite created, I make the 3D sprite follow the "NME_Top" object and set its right face on the sprite object. Then for every movement, the good animation is played.

    Unfortunately, I can't understand why for each 3D object, "NMETop_3D", the same sprite is called. It's a problem because each 3D object is supposed to call the sprite object with the same ID instance I have assigned for both of them.

    I guess the main problem is because of the family objects but I'm sure there is a way to make this work.

    I'll be glad if anyone knows how I can fix my problem!

  • Sometimes the order in conditions matters, try moving Slot_ID= to the top of the condition above 'powerup is overlapping slot' to see if it makes a difference.

    That's was that! Thanks again for your help lionz!!

  • Ok thanks lionz, with the 'copy picked' selected it's a bit better: Now I can see that the cooldown effect is applied on the correct power-up object.

    But it still use the action of the power-up on the first slot for both. That's really strange because now it should works.

    Even if I inverse the event, like "if Power-up is overlapping PU_act_Slots", the result doesn't change anything…

  • You should use a variable for this. Use a boolean "Infected" that turn to true when your object is in collision with an infected object.

    Then if you don't want to use an animation, maybe you can create another object over the infected one and use the pin behavior. The new object created can use it's own animation to look like the virus spreading over the first object.

  • Thanks but even if I change this my result is the same

    Whenever I use the "Y" or the "B" button it always call the power-up overlapping the first slot.

    I also use a cooldown as you can see. When the power-up is called it put the cooldown boolean to true and make the power-up sprite opacity to 50%, so I can see if the function work. It should work for only a power-up at once but actually both power-up's opacity turn to 50%. That's mean it doesn't make a difference between the power-up on Slot_1 and the power-up on Slot_2.

  • Hello everyone!

    I'm in trouble with a function problem. I have for my game two slots for my power-ups. Each one can be activated with a button, "Y" for slot_1 and "B" for slot_2.

    Of course it only works when there is a power up overlapping the slot.

    First I did this:

    It works fine and I can call the corresponding power-up for each slot. But I have to duplicate each power-up (event and action) for each slot. And I'm a bit lazy, so I thought that I could reduce my code to just one function that will call the correct power-up for each slot. So I will only need to edit this for futures power-ups.

    So I did this:

    So it choose the correct power-up in the function but unfortunately, it only choose the power-up overlapping the slot_1. It doesn't consider the slot ID number. I tried many different possibilities but it still doesn't work.

    So if anyone has a solution about this, it will really be helpful!!

    Thanks!

  • Ah! Thank you dop2000!! I knew I was messing up with something on the axis, I still need to practice!

  • Hi everyone,

    I'm just discovered the Advanced Random plugin and think I can use it for my game when I need to drop pick up some loot randomly.

    For now I create an array as a .Json file to manage my loot:

    The column 0 is for the name, the 1 is for the rarity of my object and the 3 is for the object cost. For now I don't need to use the "Cost" column for what I want to do.

    My main idea is to use the rarity column for the weight entry in te AdvancedRandom. So for exemple I would like the object "Banana" to spawn 75 more time than the others objects.

    I tried to create my AdvancedRandom table using this code:

    I can see that is doesn't really the correct way to use the plugin, the debug show me kind of a mess and repeat 3 times my datas (because of my 3 column)

    I can I correctly set this?

  • It's working! Thank you!

  • Oh yes you'r right, my mistake. But even corrected, it doesn't delete all the datas. My purpose is to delete everything in the X axis but also in the Y, like 0,0 0,1 0,2 and 0,3

    These are my saved values, and I want them to be deleted:

mardoch's avatar

mardoch

Member since 21 Nov, 2013

None one is following mardoch yet!

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies