GeorgeZaharia's Forum Posts

  • just add physics to it? it works on tiledbackgrounds on my side.

    make sure you use collision polygon in the physics boundry

  • I'm sorry, but I don't think what you are saying is correct.

    In any event actions and sub-events are executed from top to bottom. Functions are no different. They don't add any "wait 0" to the execution order. (unless you are using asynchronous functions and specifically wait for them to complete)

    And any conditions are evaluated only once, except when in loops.

    yes you seem to be correct, i just tested my "understanding" doing what i was saying, the functions do call up correctly even if in 1st function call i change 2 conditions to not fire the functions in the list ... weird i can swear what i was saying was happening ... but it seems is as you said, when we actually wait for them specifically to complete, or in loops. sorry for dragging it out to much, this was actually really refreshing, i understood something new on functions hehe ...

  • The only possible scenario when the first function could stop the other two from running is if it deactivated the group with those two functions.

    hehe, you just answered it yourself... what is a group? (just a toggle value 1 or 0/checkbox)

    what is a conditional logic locked not equal to zero? or equal to false? same thing... so if in the 1st function call those 2 conditions change before the 2nd or 3rd function call fires up... they will not fire.

    Edited: this is based on the function method of action... if you remember in Construct in order to have events/action act like function calls we have to do a wait 0 so next set of actions wait for above to complete then fire up ... but in functions... that wait 0 happens by default.. this will cause the other 2 functions to have time to re-evaluate the conditions that fired them in 1st place. (this is main reason i don't use functions... )

  • I may have misunderstood you, but if you are talking about the screenshot in the first post, there is no way the first function can disable the remaining two. All conditions are evaluated first, and if they are all true, then all actions will be executed. So all 3 functions will run one after another, without any pauses. Even if one of the functions changes the variables used in conditions, it won't matter, because they have already been evaluated.

    Hi Doop, you understood me correctly, i was thinking the 1st function call can disable some conditional logic parameter before the 2nd function or 3rd fires up, i know it shouldn't happen as you said, since that execution was already evaluated, but strangely enough in C2 this would be a regular thing that happened. and i was thinking that issue would've passed on to C3 as well... since nobody knew what would be the cause at that point... this sounded to me as a good reason .. hi hi ! ^_^

  • I mean, it would be very strange for the bullet to hit the center of the enemy while the cannon is clearly aiming for the top left sooooo...

    I mean both (;

    ehm move the origin point of the target? or make the image container frame larger, and have the image be smaller inside? not sure why hitting the center is a issue, all games are doing the same thing. but i guess ... imagepoint reposition will fix it.

  • by aim for another image point you mean the turret bullet to hit another part of the target? or the way the turret is following the target?

  • if you are in a room, disconnect from room.

    if you are the host, disconnect from signaling server. (this will close the connection for everyone).

  • im pretty sure your OR 3 conditions under while needs to be as subevents... and not on the same conditional line as While.

  • Yeah makes sense, was working on this late the other day, but from what I remember it failed when any of them were toggled on no matter which one I chose.

    Hi if you read what i typed, you will narrow down the issue, the problem is in the function calling. there is a pause between each function you call, therefore make sure to rearrange them.

    this sounds like when the drag and drop conditions happen, the 1st function call will disable one of the conditions and the other 2 remaining in the action list will not trigger.

  • you need to also pick the text object to match the item uid ... or something that pairs the text to the object you create...

    Edited: for example i mostly used local variables on objects... and do lets say item.orderid & text.orderid

    if you have a dictionary or array with your item, you can also set that variable, and when u spawn the text object just feed the orderid of the item on the text orderid.

    and then when u add a new item in your inventory pick the text that matches orderid with item.orderid

    something like bellow code

    repeat 5 create item at XY 
    	set item.order id to loopindex
    	create text at item.X item.y + 10
    	set text.orderid to loopindex
    on click add to array item.atorderid + 1 
    pick text.object by evaluate text.orderid = array.at(text.orderid) set text to array.valueAt(text.orderid)
    
    
    

    the above code might not work properly, but should give you an idea on how to set the text and pick its value, depends on how you declare the orderid or value you pick/pair items to text object and viceversa.

  • here is a simple stacking inventory item adding subtracting using array... in C3... C2 should work the same... hope free version can use arrays? not sure..

    example inventory stacking items

    now i know that the example above just adds and subtracts to a entry, but based on that entry in your inventory you can create N bottles of potions of apple juice for example for the value at index 0 in this case.

    by doing something like

    on start of layout
    
    compare array.AT0 
    for "x" from 0 to 4 (lets say your inventory width item has 5 slots width only visually) 
    for "y" from 0 to array.at0 (but unlimited height cells)
    
    	action> 
    		create object on 
    			inventoryslot.X + loopindex(X)*item.width
    			inventoryslot.Y + ((loopindex("x") + loopindex("y")) /2) * item.height
    
    
    

    if the value at array0 is equal to 10 for example you should have 5 columns width of apple icons and 2 rows

    the above example is not that useful when you have large ammounts of items like in a crawler dungeon rpg thing... but does it jobs if you have a small inventory of like 5-10 items... i think there was a example for a stacking inventory like dungeon crawler type around here... doing a insert/pop array thing but its been years and the tutorials area got sort of mixed up. happy hunting and hope it helps.

    here is one that looks like the one i was thinking at ... maybe is newer than the one i was thinking at

    but has item categories and stacking inventory.

    rpg inventory + equipslots c3p

  • (https://dribbble.com/shots/7281474-Finance-Mobile-Dashboard?utm_source=pinterest&utm_campaign=pinterest_shot&utm_content=Finance%20Mobile%20Dashboard&utm_medium=Social_Share)

    it is possible yes, but performance wise, and project future expansion etc... personally i don't advise it... i mean nobody can stop you, im just saying it will be more practical to replicate that in vue.js or something similar.

    but if you want a prototype that has no backend, yea u can definitely use Construct to do it... as a interactive slideshow of sorts etc... many companies are using construct as a prototyping tools being it for games, admin dashboards, websites etc... i even used Construct 2 not 3 ... which is way faster(3 is faster... and i used the old C2 slughish boy)... to prototype a arcade sort of steam clone ... with a admin dashboard... sure was just a slide show interactive elements etc... showing what was about and how it could interact with stuff... and to my surprise even tho the project ended up being something like 500mb ... it run pretty smooth. but compared to a native vue.js you have the same power even faster... in around 10mb or less. plus the scalability on the backend... etc ... way better on vue.js type of environments..

    that is why there are game engines, and website programming languages. sure you can make websites with game engines and games with html5 and css and some javascript ... but both have downsides to each other.

    i mean if you can code ... i would code it... but if you can't code... Construct definitely will do what you need it to.

  • drag and drop will fail in 1 certain situation as far as i know. if you set the position of an object by events while dragging it will cause drag and drop to fail. other conditional logic shouldn't affect it unless some conditions returns false which will basically not happen since the condition logic you have is not meet.

    based on your conditional logic they should work, however they might fail on calling the function and execution and their respective actions

  • I found the "pick nearest/furthest" condition under the "size and position" conditions and set it to pick the nearest Enemy family instance to the x and y of the hitbox. But now I am having trouble figuring out how to make the bullet move to the instance that has been picked by the condition. There doesn't seem to be an obvious way to actually return which instance is chosen by the condition. How are you supposed to do anything with the information the condition gathers?

    when you pick nearest on the action on that condition you need to create the bullet, and set its angle towards that picked family member. you can't otherwise... i mean you can but you need to save the position of picked family member into some array or variables then create the bullet and set its motion angle etc... depends on what you need the bullet to do, if its one bullet or multiple bullets, like continuous shooting.

    you can also have 1 variable and pick the familly by its value, like IID ... save the family object IID into a variable, then use on shooting create object at gun position then a subevent and pick by evaluate the family.iid with the variable value you saved before, and then create the bullet and set the angle towards that position of the mathcing family iid = value

    here is a example of what i "burfed" above.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • try using this format, and i suppose the syringe pulley with rubber is a different sprite than the syringe itself. Let for this example name them object2 for syringe body, and object1 for syringe movable part.

    Everytick > object1. set position. to object2.x, object2.y
    
    On Touch is Touching 
    If touch.x greater than object1.x >action> object1. move at angle 0 > min(distance(Touch.X, Touch.Y, object2.X, object2.Y) / 3, distance(object2.x,0,object2.bboxRight-20,0))
    
    

    in theory should work the same as the physics catapult game example but only towards angle 0 no Y no other stuff.

    and limited to the length of the syringe body X position (please check origin point in animation frame they have to be similar) to syringe body bbox-right or right edge... since we don't know for sure exactly what that image size is... from needle to a 20% near popping the interior pulley out.

    no need for drag and drop behavior at this point.

    here is the code as an example file

    Edited: wait what behavior is that boundedDrag&Drop? is that a custom behavior or official? :O never seen it lol. in theory should be the same as my code... set boundry min to 0 max to 170 or so... depends on your syringe size length... also make sure you trigger the drag and drop only if the mouse.X is greater than the syringe body X and syringe body X needs to have image point near the needle or where the needle meets the plastic area.

    Huh website is acting strange, well that is it for me... to many fiddling on this product... never polished or finished. Hope it helped OP! :) i have to go to work now! have fun.