Yann's Recent Forum Activity

  • I don't know if you noticed but the 'log' variable... is in CSV (Coma Separated Value)... Just saying :D

  • GingerBatMan

    Also you can add

    System: iterator = tokenCount(log,newline)-1
      -> System: set Replay to 0
      -> System: set iterator to 0

    nested under event 2 just after event 3

  • You can't name instance variable as X and Y 'cause it would conflict with the inbuilt .X and .Y for position.

    Also in your solution you suggest to spawn a lot of objects to work as a path remainder (breadcrumb). But it's too heavy to create a whole object when you just want to store 3 values (X,Y and Angle).

  • Well I already did that in construct classic to test the Stack,Queue,Deque plugins. So it's not much of a challenge. Also I never used webstorage.

    I'm not really sure how (in a design sens) I would use it. You know, webstorage seems like storage that can be wiped out anytime, so I don't know how to design something with that level of reliability

    Should it only just be for temporary stuff? Is a replay a temporary stuff? If it's just temporary why not storing it in a global variable?

    So to design a permanent save system, I'm not really sure webstorage is a good tool.

    Anyway, logging x,y,angle and rotation could be done really easily by :

    Global Variable log = ""  // each lines is a string formatted as "X,Y,Angle"
    Global Variable replay = 0  // is on replay mode?
    Global Variable iterator = 0  // position of in the log during replay
    System: replay = 0
      -> System: set log to log&Sprite.X&","&Sprite.Y&","&Sprite.Angle&newline
    System: replay = 1
      Local Variable state="" //current state "X,Y,Angle"
      -> System: set state to tokenat(log,iterator,newline)
      -> Sprite: set X to tokenat(state,0,",")
      -> Sprite: set Y to tokenat(state,1,",")
      -> Sprite: set Angle to tokenat(state,2,",")
      -> System: add 1 to iterator

    That should work.

  • siron

    Oh a lost Construct Classic user :D welcome \o

    Yeah colors are vector type variables (which means they have components)

    Its a bit like position, if you want to store a position you need two variables (X and Y components)

    So if you want to store a color you need 3 (Red,Green and Blue or Hue,Saturation,Brightness) maybe 4 if you add Alpha (:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Actually adding/removing things, as far as my system goes should be done like that :

    • adding:

        - creating the new item with its stats (default or not)

        - adding his UID in one of the invSlot 'possess' instance variable

        - reactivating the 'Replace' group

    • deleting:

        - destroy the item (thus completely losing its custom stats so don't do it if you just store that elswhere: on the floor, in a crate (= another inventory system)

        - reseting the 'possess' instance variable of the slot to -1

        - reactivating the 'Replace' group

    No, not an issue the thing to do now, is more a save and store system to carry all these datas through different layout.

    Basically it should be an Global Array that store the list of these items with their stats and in which slot they are (maybe each time you reactivate the replace group, or just when you change layout)

    Also what's laking is a context. How you will use this example in an actuall game is important (I guess the whole UI would be in a dedicated layer, and you'll switch it's visibility on and off to show and hide it)

    That's all (:

    01lifeleft

    We'll see but it's better if you try first. How do you think did I learn? :D

    Actually making a degree on construct classic and often helping people is what made me learn fast. I only discovered scirra products last christmas.

  • Yeah I thought that was something like that (:

    Well, I'll see during the day if I don't fall asleep /o/

  • No no both are good, I still use cc for even work. Like you know if you want to create batch stuff or some simple pixel manipulation. CC does that well, 'cause you can wrap up the functionnality with the interface in no time.

  • Probably with the browser object but I never tried

  • Panning.capx

  • If I simplified your capx it was for me also... so I could better read it :D...

    Now it's a mess again. I am patient so I was cleaning it again but c2 crashed on me so... meh!

Yann's avatar

Yann

Member since 31 Dec, 2010

Twitter
Yann has 5 followers

Connect with Yann