j0schi's Forum Posts

  • ive already read this article 2 times, maybe i have to read it again hahah

    ive got your point, but i have to set the instance variables to the ojects or not?

    maybe the next screenshot makes it clearer what i want to archive:

    [attachment=0:ydt3lnlv][/attachment:ydt3lnlv]

    on the other hand i ran into the same problem with the enemy health... each enemy has a certain amount of helth when he spans. all enemys are in the family pirates

    now if the enemy gets a hit i have to subtract one of the health of this enemy... man that really gets complicated, i will look at your example again and hope i get it.

    if or if not i will report back tomorrow... normaly i cant sleep when i have something like this in my mind haha

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • it took me a while to exactly understand what you wrote... and on second thought i have to go with my aproach. i want to use the instance variables, as i need more values than just the description. and it seems to be "cleaner" for me if i dont define all that over the actions but in the instance variable for the objet itself

    let me know if i am wrong here...

    regards

    patrick

  • well, this is way better than my aproach, which was:

    [attachment=0:2aetgq5q][/attachment:2aetgq5q]

    still not perfekt, but i can work with this for now, thank you very much

    i am missing something like a simple mysql database... i would like to pull those values from a database as i plan to implement much different objects.

    i have a basic knowledge of mysql and php. so my longterm goal is to make an multiplayer game with an ongoing economy... but that is far from now

    i will look into that in a few weeks

    i am shure this wont be my last question i have to ask here

  • Hey nimos,

    thank you so much for your time! can i buy you a beer? (donation button)?

    actually this was the question: [quote:3exp0x9i] but variables added to specific objects are not available to family object

    the description and description1 variables where only for testing purpose.

    [quote:3exp0x9i]So to fix It you have to use only the description from the RadarObjects as this is shared amongst all the objects in the family and then remove the description from the specific objects.

    This wouldnt make sence since every object has its own discription...

    [quote:3exp0x9i]You can in design view set Asteroid description = "This is an asteroid" and for the spaceships set it to "This is a spaceship" and this will be the default value for all newly created spaceships or asteroids.

    i have done this, and this is what i want to archive. the goal was to do that in a single select action (see screenshot) and not make a new action for every object family...

    but maybe that also would make sence... than stations could be green, spaceships red and asteroids gray. so i have to devide it by familys and make an own radar and select action for each family. that would leave me with the problem that later there are differen spaceships, so even if i have a family for spaceships the description is never the same... (i am thinking while writing, sorry) so i have to find a way to display the discription of a specific selected object. i have to rethink my aproach here...

    [attachment=0:3exp0x9i][/attachment:3exp0x9i]

    as you can see on the screnshot i am trying now to get the instance variable "description" by UID of the object. is there a way to select the value of an instance variable by UID?

    seem logic to me as i can select the UID from the clicked object...

    regards and thanks again!

    joschi

  • Maybe i can answer my own question... it seems to be not possible, i should use some kind of 2D array, as the dictionary only supports 1D... am i right?

  • Hey nimos100, Thank you so much for helping me out here

    1) yes, the values are different for each object but each object has the same variables... so i thought there is an easy way to just say give all those objects the instance variable "description, shield, firepower" and then enter each value manually without having to create each instance variable for each object manually as they are aleways the same.

    2) got that but actually i will show the description from the object in the hud... but i cant get the variable "description" from the object, just from the family

    you can see the game here: bytecrunch [dot] org/th/

    as you can see when you select an object it shows the description, but i cant set it to the specific objects description variable, just to the familys one...

    as you can see on the screenshot each object (and i am planning on adding a large number) has several values... but somehow i cant access them from the "family"... therefore i dont know how to display the right description

    also i want to add a menu with different menu options for each object, but maybe its better i make a if and determine the object type...

    regards

    joschi

  • Hi all

    I am just starting out with construct 2 and try to understand everything

    So far everything works pretty well, but now I am stuck at some point and just can’t figure it out myself.

    Here is a link to better understand where I am stuck…

    [attachment=0:38hj0w7t][/attachment:38hj0w7t]

    In general what I am missing is some kind of a database or global values for objects which are easy to set…

    I am trying to build a game which has many items. Naturally each item has different values. At the beginning I try to keep it simple, so there are the objects “stations, asteroids, different ships”

    All those objects have some variables likle “Name, Shield, Mass, Max Speed” which I want to display on a HUD. So here are my Questions:

    1) Is there a way to easily insert all those values for all objects in a table style or do I have to create every instance variable for every object manually even if it is from the same type? I tried to copy paste them, but with no luck.

    2) As you can see I have grouped the objects in a family. Now that I want to show the description I must select the instance variable from the object which is selected. But I can only access the instance variables of the FAMILY how can I get the variables from the selected object?

    Am I doing something wrong or is my whole approach to do this wrong? The select and target the selected object works pretty nice… so I would like if I could get the description to work. Also a database style workflow would save me so much work creating all those instance variables.

    maybe i need some kind of "global instance variable", a variable which is added automatically to every object in a famiyl...

    Your help is highly appreciated!

    Regards Patrick