matriax's Recent Forum Activity

  • I think we are saying the same thing.

    http://www.blackhornettechnologies.com/ ... _BHT2.capx

    blackhornet Yes is the same way. Adding the name or Zorder is only necessary when the object is created, and can be different in multiple ways i still don't know so is integrated in the button object of each type instead in the big events thing at the moment.

    So yes, this is all, thanks for your help and the time to reply, very appreciated! <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • blackhornet And each function called by the button will have all the properties plus all events and their repetitive events for all buttons.

    I want separate the unique properties for each button and one function with all the events that have in common all the buttons will be pressed for creating sprites.

    I don't know if i explained well, or i not understand you well XD.

    ----------

    On button Circle:

    Set Unique Properties for the circle

    On button Square

    Set Unique Properties for the square

    Lots of events shared by the same actions:

    Actions : On created, On Drag Start, On Touch,etc....

    Evens that runs after this conditions: Select, set textboxes, set sliders,etc...

    So if i want to add a new sprite type i create a button with the unique properties. And if i want to improve the things you can do for the sprites i add an event on "Lots of events shared by the same actions:".

    This is my actual design, what is the way you saying?

  • You can't use "On created" as that is called during the Create action - you don't set the name until the next action, so there is no way to get the data until after you've set it.

    blackhornet Ahh i see obviously! i thought the "on created" works after the event button cliked is finished! :S,

    Not have to be specifically "on created", an action that occurs one time that can detect a new sprite has added wil works.

    I have now:

    On created(Tha is the one only works at the moment with Wait0s)

    OR

    Drag&Drop Start

    OR

    On touch

    Then -> Select, set name, set Zorder, set opacity to slider,etc...

    Mmm, maybe there is some action that detects when the "On button Clicked" event is finished i guess will works too.

    If not well, if only is one repetitive event inside the sprite types creation not is the desired but if there no other options and well i guedd i can use to do other future things that needs to detect the end of the button event i guess.

  • Not intended to use with 'on create'. Just as a standalone event. This will always write the last created one in the textbox. (sorry was evident for me)

    If you need to use the 'on create', then use what blackhornet suggested, works because the pick by UID always works, no need to wait till the object is actual added to the IID list (pickable).

    99Instances2Go Don't worry! i understood you correctly, without OnCreated, but in the code i put a solution that works like yours but the "textbox" is not editable, and i need it to use for rename the sprite.

    blackhornet THANKS!, Yes, works without WaitXseconds.There will be any way to do the same without put a function/event in the On Button clicked ?. As i said in the code "And the box_sprite_name event have to be out of the button "on Clicked" like now." i guess i explained bad i mean none event for that inside this ones.

    Why?, now for each sprite type i want to create i have to add this function. While "On created Sprite" I can add all the functions and events i want to do, only one time instead of repeat the same actions/events in all the buttons. Is there anyway? Sorry for not be totally clear.

  • Pick all Sprite

    Set TextBox as Sprite(-1).name

    ?

    99Instances2Go Works but the textbox can't be edited. If i put "On create" the first click on create not show nothing in the textbox, and for the next appears the name of the previous object name. Adding the "Wait0s" your solutions works "on created" <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz"> .

    Here is the .capx edited with your solution added in the bottom(Event 8), maybe i misunderstood something:

    https://dl.dropboxusercontent.com/u/659 ... oblem.capx

  • Works, but still prefer a solution without WaitXseconds. And thanks for the link i'm going to read now, looks interesting!

  • Is all explained in the code but the problem is that i want that the textbox updates with the last sprite name created.

    First an event that says -> On click-Create X object

    Second > On X object created > Set TextBox as Sprite.name

    The unique way to get this working is adding a "wait X seconds" firts, but this will give me problems on the future, so how i can fix it without the WaitXseconds ?

    Here the .capx

    https://dl.dropboxusercontent.com/u/659 ... oblem.capx

  • Here the capx of the topdown shooter:

    https://dl.dropboxusercontent.com/u/659 ... p17b3.capx

    And here is the demo if somebody is interested before download:

    https://dl.dropboxusercontent.com/u/659 ... index.html

  • Try Construct 3

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

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

    This looks amazing! Love your shooter example with the dynamic shadows.

    I want to make a Isometric game that looks like this:

    Will your Effects work here? Can I have light confined to the walls and produce shadows?

    The normal maps do changes on the light using a texture over other. The normal map no project shadows to other tiles, for that use the Shadow Caster,etc...

  • Yep, i design the same solution XD. Create a .gif with 1000 frames of 1x1 pixels and load it on the sprite, in animation called "Imported image".

    So if the sprite Base64 variable is different of "" then set animation to "Imported image", set frame to Zorder variable of the sprite and load image using the Base64 variable data.

    ---

    Will be great if there is some way to "object-clone" action so will have an sprite object with the same properties but without share the image texture. Or an option in the Sprite properties of an object on you can say "Share image texture with other instances: Yes/No" and problem resolved. What you think Ashley , this can be a new feature or there is another way to fix the problem we're missing?

  • korbaach I'm looking the variable to store the image data and the NWjs.DroppedFile saves the folder direction of the image in the PC not the data. So if i export the sprite data .jSON if somebody in other PC loads its if not have the image in the same folder none image will be loaded. For that i used Base64 because i not found another way to save data in .JSON.

    Is there anyway to manipulate binarydata in the sameway as Base64?

    Also when a file is dropped all the sprites changes their image to the last image dropped, because they share the same image texture.

    How i can tell that every time a file is dropped creates a new sprite and load an image without share it with an other instance of the sprite? Or not is possible? And in case of not, how solve it to drop various image files and show all the diferent images??

  • Ah! i don't know the sprite load image also get that. (I knew URL and URI(base64 but not also binary data)

    I'm using Base64 for store the image data in a variable. So after i save all values in an array and export the array.asJSON,etc...

    So in a new running of the app if you load that .json all the composition and images are loaded.

    Then, seems i can store the binary data in a variable instead the Base64 to after apply using Load image URL? I'm going to try it!

matriax's avatar

matriax

Member since 22 Jun, 2015

Twitter
matriax has 114 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies