grossd's Forum Posts

  • Hello,

    One one event sheet i set a boolean instance variable to false, just to see that in another event sheet, the value stayed true.

    I looked at all assignments in the project and there is no where else, that value could have been set to true, beside in the initialization code.

    Interestingly, when i deactivate the whole group in which the instance variable is tested, then, the test doesn't apply and things work - but deactivating a group is too brute force.

    Could this be a bug in C3.

    thank you,

    Dan

    Tagged:

  • Hi,

    Its the other way around:

    I am thinking that if I can live with a fixed number of objects, that is not large, then each object can be a single instance of a dedicated type.

    Dan

  • Thanks.

    Yes, that is what i've done.

    I am now wondering if i should work with different object types to begin with, and use families for common actions.

    Although, i guess, its not possible to create object types only object instances.

    So, this would only work if i have a fixed number of objects...

    Dan

  • Thanks,

    As far as I understand, this would not work. I need two types, each picking from the same set (type) of instances and accessing the same instance variable. Unfortunately, one can not share the same instance variable between a type and a family, hence i need to duplicate and replicate the instance variable and its value.

    Either between a type and a family or between two families ...

    As mentioned, I think, best would be to have an alias mechanism, if this is easy to include in the current pick paradigm -- its a solution "between" the others we discussed.

    Dan

  • ok,

    looks like the idea of a parallel instance variable seems to work --

    So name a sprite type has a name instance variable and the family of that sprite type has an f_name instance variable-- which is inherited to the sprite type as well.

    I now ensure that both are the same by creating an on start of layout event where i for the sprite f_name to name.

    Like this name is now available in both family type and sprite type ...

    thanks,

    However, I think in the future a simpler solution should be available, for example, to simply add an alias for sprite type in picks and then refer to the alias in expressions -- an alias would have all properties available and be treated as if its a different type for picking.

    Dan

  • Eager to try to move instance variables to the sprites.

    Also, how C3 deals with the same instance variable name on two different families having the same underlying sprite type. The underlying sprite woudl inherit the same instance variable name from two families -- hopefully, only one then available for both families.

    Edit: C3 only allows one instance variable name per all families for same underlying sprites.

    I guess the solution is to define two parallel ones and set them each.

    Dan

  • Thanks,

    Yes, I tried families,

    Trouble is that once i refer to picks by family, i can't access the instance variables of the underlying sprites via the sprite family name.

    However, I need to access instance variables so i can do conditions across both sprite families.

    is there a solution for that?

    EDIT: to be more precise:

    The expression:

    SpriteFamily.instance_var_name

    does't work, when instance_var_name is defined in the underlying Sprite.

    However, now that i think of it, perhaps, i need to define instance variables on the families to begin with and not the underlying sprites -- in the documentation it states that sprites inherit instance variables -- so perhaps that's the way to go ...

    thanks,

    Dan

  • Hello,

    I want one sprite to follow another sprite, and have this dynamically configured -- which follows which.

    To this end i have an instance variable in each sprite where i set what sprite is the follower and what sprite it follows.

    I now need to do a loop that (during every tick) picks out a first sprite, looks-up an its instance variable the another sprite, and then picks the other sprite to retrieve its location information.

    But, how do i pick a second sprite within the loop since i only can refer to one sprite type in the loop -- how does the loop know which sprite i am referring to -- or how i can tell the loop which sprite i want to refer to for picking

    any thoughts are much appreciated,

    Dan

  • Hi,

    Thanks.

    With your clarification, I now notice that i didn't do this right.

    Its not a waypoint but an end-point, i am using, and i am doing another moveto to another location to get to a another end-point.

    The new end-point location to move to can only be determined after arrival therefore i can not use way points.

    thanks,

    Dan

  • Hello,

    I am making use of MoveTo behavior, and want to increase the speed of a sprite after it arrives at an object.

    Unfortunately setting max speed to a value after the On Arrive event, stops the sprite.

    Is there a way to overcome this, seemingly, built-in behavior?

    thank you,

    Dan

  • Thank you.

    One reason i use a listbox is that i add message to the top - so i can always see the last posted item.

    I'll try textboxes again and see how it goes.

    thanks,

    Dan

  • Hello,

    I am using a number of listboxes to log detail for each different sprite in the game. To this end i have a function that takes as parameter the name of a sprite and a message, and then displays the message in the listbox of that sprite by name.

    I notice that theo listboxes don't update in real time but rather, they stay clear and then after several seconds they update in bursts with lots of messages appearing.

    I am not sure why this is the case.

    Is there a way to make the text appear at the time is written --

    thanks,

    Dan

  • Hello,

    I am using move-to to move a sprite to an object. The event arrived-at tells me when the sprite arrived. I am however wondering, if there is a way to pick the object where the sprite arrived at?

    thank you,

    Dan

    p.s. one way, perhaps to do this, is to store in an instance variable the name of the object that was used for the move-to command and then retrieve it from there -- i am however wondering if there is a more direct way to achieve that.

  • Try Construct 3

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

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

    I seem to recall that i once created a peer to peer Websocket communication link between two C3 games. Do I recall this correctly that this can be done?

    Reading the documentation now it seems that this can not be done (anymore?). And I now need to run a websocket server reachable from both peer games to use the websocket plugin successfully.

    Do I understand this correctly?

    thank you,

    Dan

    Tagged:

  • Hello,

    I am very curious if there exist game exercises that specifically come to support a math curriculum for different grades.

    As we all know math is underlying everything that happens in a game, it would be great if there is a list of simple game exercises that student can be challenged to do, with each exercising specific math skills.

    In particular in times like these, i am wondering how much of the math curriculum could be taught with C3 ...

    Dan