DUTOIT's Recent Forum Activity

  • Its really hard finding games that were made with C2 that stands out.

    A lot of big games don't like to disclose how they were made. In fact you go out of your way to hide that you used xyz - lol.

    My vote goes with this as sexiest c2 game

  • JosepM

    Afterthought:

    You say you got lots of objects(images) for each piece of map etc.

    You are adding those pieces to frames right? Object Sprite called world map, and each frame is country etc.

    So all under one sprite object which has instance variables. You drag image and set the initial frame...

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

    That way you can have map with multiple frames of individual pieces. etc etc etc

  • JosepM

    Bundle them up using families. And assign instance variable to families...

    So for each families...

    condition: instance variable bla bla

    etc etc

    Edit:

    You need to make use of of entire toolset, from families to containers. and instance variables. With turn based and movement you have to keep track of lots of data, so you need more tools for the job.

    I'm all ears for simpler way. When you start moving pieces, having pieces overlap others, having multiple players, and tons of sprite objects. Instance variables are the only way I can safely assign unique data to various objects.

    With a unique id and data, you can then save to array/dictionary/ and ultimately to webstorage (save points)

    All ears if you come up with simpler solution - shrugs.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [attachment=0:1fk56efc][/attachment:1fk56efc]@JosepM,

    Very Basic example.

  • Hi DUTOIT

    I explain with more detail what I want to accomplish.

    Now I have the “hard coded” version of the map definition, I mean that I defined for each zone the posibles destinations in “touch event”. Thank you for your tips.

    I want that these posibles destinations will be drive through an array. For each zone I have an array with the posibles destinations, so when the user “touch” one zone, I want repeat for each element of their array and change the frame, so maintain the zones connectors will be more easy.

    Pseudocode.

    Load from an URL or file the JSON of the arrays for each zone.

    Zone #A touched
    if active=true of Zone #A
    repeat for each element X of array #A
    	Change frame of zone X
    	Set active =true
    end repeat [/code:1r099xrj]
    
    On this way I can update the zones destinations from an array and not by “hard code”
    
    It’s posible do that? how can I refer to a sprite inside the repeat loop?
    Can I pass sprite reference to a function?
    I read about the UIID but don’t know how pass it?
    
    Salut,
    Josep M
    

    Load from json using ajax works perfectly.

    sprite.uid / sprite.iid gives you the unique id of the sprite. But I don't like to use this.

    My preferred way is to create an instance variable and name each one, that way I can control the assigned number.

    And you can retrieve it, condition it, manipulate it etc etc easy enough.

    Point is. You can now check against the array.

    So if instance variable = to any of the array numbers then sprite frame 2 to highlight possible moves, or whatever.

    You need the instance variables to use in conditions, especially when moving pieces, highlighting active/non active etc etc.

    UID/IID should never be hardcoded.

    So if zones destinations (instance variables) = array possibles destinations then ...[do this, or that]

    Don't hold me to this:

    But instance var

    City Name: London

    Zone: 1

    Section: 1

    City Name: Paris

    Zone: 1

    Section: 2

    Array

    Zone1

    :: 1

    :: 2

    Zone2

    ::1

    ::2

    if zone.zone = 1 (this automatically selects all sections)

    if you want specif section, then add another condition if zone.section = 2 (this narrows it down to paris)

    So foreach zone...

    Condition: zone.zone = 1

    change frame bla bla bla

  • Lots of folks projects (the big ones) are between 1000 - 5000. There really isn't a limit on events.

    Limitations will arise from the usual suspects.

  • Quick reply, as I don't have much time.

    1) put a condition that touching zone isn't touching sprite.

    the X is right click and invert which means opposite of what condition is saying.

    See image attached -

    [attachment=2:1yi0gpd9][/attachment:1yi0gpd9]

    touch X(is not) touching sprite then do this...

    2) Make one main event sheet and include all event sheets into it.

    [attachment=1:1yi0gpd9][/attachment:1yi0gpd9]

    3) I think I understand what you are saying, but I'm getting old and not as sharp as I wish I was.

    You can do this, and there are number guys who have more knowledge about this than me.

    I usually hardcode everything. Or, use invisible textboxes with data that I can retrieve. Or on startup save data into instance variables.

    THen use foreach sprite.... bla bla bla

    look system > loops >

    Each sprite has unique id, and each sprite can have instance variables that you can save data to that is unique to that sprite.

    I used something similiar to tutorial using custom paths using waypoints. Don't have link offhand.

    It uses instance variable to store waypoints.

    Here is capx from tutorial:

    [attachment=0:1yi0gpd9][/attachment:1yi0gpd9]

    Hope that helps a bit

    Edit: look at this demonstrates sort of what I am saying.

  • Use Choose

    choose(a, b [, c...])

    Choose one of the given parameters at random. E.g. choose(1, 3, 9, 20) randomly picks one of the four numbers and returns that. This also works with strings, e.g. choose("Hello", "Hi") returns either Hello or Hi. Any number of parameters can be used as long as there are at least two.

  • Ohhh well, I wrote a whole lot of messages already and this never happened....perhaps they really were online then or I didn´t notice that....

    As I said, I could be wrong Just what I noticed - lol.

  • I believe they move to sent when receiver is online or receiver receives it. None of my pm's are instant unless reciever is online at that moment.

    Of course I may be completely wrong.

  • I'm not sure I follow you... it is using layouts and layers, which scales using your flavor of selection. As long as you keep it 1080p 16:9 I don't see the problem.

DUTOIT's avatar

DUTOIT

Member since 17 Jul, 2013

None one is following DUTOIT yet!

Trophy Case

  • 11-Year Club
  • x5
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

14/44
How to earn trophies