GeorgeZaharia's Recent Forum Activity

  • You do not have permission to view this post

  • usually is instant, unless something happened in the upload/approve process to curate games quality.

  • Or change layer interactivity setting.

    oh i didnt knew this is a thing C3 really upgraded in the past years xD

  • u need to add a condition that blocks invisible objects to be clicked.

    u can do all that by doing a group in the eventsheet, add ur all events that are affecting the "invisible" objects and enagle disable that group when "layer1 is visible /invisible" toggle group "1"

  • > make sure the player is only 1 instance, and that the value is available at all times to be read, meaning the attackspeed variable of the player should be static not changing.

    >

    > it should work, but is not great practice to use direct instance varible of other objects as those other objects get destroyed etc and then all ur data is lost that u are based ur other items to depend on.

    >

    > better have the character stats like "attackspeed" saved as a array or global variable then use that on ur bullet behavior.

    >

    > and to use that u need to make sure the data is set on bullet creation. in a proper order

    >

    > u cant have

    >

    > bullet set speed to player.attackspeed above the line that creates the bullet.

    >

    > always needs to be after bullet is created. otherwise will change all bullets in screen, or give u weird glitches.

    >

    > FIY the setting of bullet speed can be done using events

    >

    > <condition> on bullet created /spawn etc < action > set bullet.speed to player.attackspeed

    >

    > hope it helps.

    Thank you, this helps a lot. I notice that the global variable says 'static'. So if I have a playerHealth global variable and I set it to '100' and 'static', does that mean I cannot change it when the player gets hit by a bullet?

    Static

    Only applies to local variables. By default, local variables reset their value to the initial value every tick. However if Static is checked, the local variable's value will persist permanently, like a global variable. Static local variables differ from global variables in that they can still only be used within their scope. Global variables always hold their values permanently so the Static option does not apply to them. For more information about local variables, see Event Variables.

    Constant

    Make a variable read-only. You will be able to compare and retrieve the variable, but not change its value using any actions. This is useful for referring to a number like the maximum number of lives, without having to repeat the number in your events. If you want to change the value, there is only one place you need to change, which is a lot easier than having to hunt down the multiple places you entered a particular number in your events. According to programming convention, the names of constants are displayed in upper case, e.g. MAX_LIVES.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • make sure the player is only 1 instance, and that the value is available at all times to be read, meaning the attackspeed variable of the player should be static not changing.

    it should work, but is not great practice to use direct instance varible of other objects as those other objects get destroyed etc and then all ur data is lost that u are based ur other items to depend on.

    better have the character stats like "attackspeed" saved as a array or global variable then use that on ur bullet behavior.

    and to use that u need to make sure the data is set on bullet creation. in a proper order

    u cant have

    bullet set speed to player.attackspeed above the line that creates the bullet.

    always needs to be after bullet is created. otherwise will change all bullets in screen, or give u weird glitches.

    FIY the setting of bullet speed can be done using events

    <condition> on bullet created /spawn etc < action > set bullet.speed to player.attackspeed

    hope it helps.

  • tiledbackround and place it on the lowest layer in ur game or at the bottom of ur layer. bellow everything else. i dont think u can set a image as BG in the settings directly yet. maybe a feature for the future? Ashley

  • I've created my main and in-game menus, and I can navigate them using the mouse with hover and click functionality. Now, I'd like to enable selection and interaction using a controller. How can I achieve this?

    Thank you!

    here is a example using keyboard u just need to swap the inputs of keyboard with the controller ones.

    i added also the controller/gamepad function now if the controller is connected will disable keyboard and if gamepad disconnected keyboard is active.

    might need some adjustments for gamepad inputs as i dont have one and not sure if will work properly. hope it helps.

    drive.google.com/file/d/1Gd6ocwDnS_hNcgZQYkUvI-9kkYge2XZX/view

  • Hi i might be talking out of knowledge, as might be a easier solution.

    But from top of my head, how i remember controller menus being done, is you have to take the inputs and lock the positions of a menu.

    for example on start of layout you have no input from the controller.

    then u prexx XYZ whatever on ur controler to get to main menu

    and there you should have a boolean that checks that user is using controler.

    if is controller then

    everytick check what user is pushing/pressing

    basically if i move up down on controller, then the menu items should turn "on/off"

    this can be easily be done by event coding.

    for example id do this with 2 global variables:

    1st) isController? YES/1 - NO/0

    2nd) menuIdState = 0

    lets pressume we have 5 menu items,

    (bellow items would be sprites with localvariables on them calling it "orderActive" = 0,1,2,3,4,5 etc)

    Continue Campaign = 1

    Start New Campaign = 2

    Options = 3

    Credits = 4

    Quit = 5

    then in events i would check for each sprite button above if the "orderActive" they have = with "menuIdState" which changes whenever i move up or down on controller.

    So if "up" was pressed on controller, i would set "menuIdState" to menuIdState - 1

    if the "down" was pressed on controller, i would set "menuIdState" to menuIdState + 1

    then on X press to select lets say

    i would check if Sprite.orderActive = "menuIdState" (any from list above) then go to screen layout etc.

  • nodejs plugin had a open folder type thing to have an app to load external audio on request and let users select their "audio" for specific reasons.

    in ur case thats what im thinking u want.

    i used it also for making a "winamp" clone.. worked fine for desktop, when i wanted to import "music" into a playlist.

    not sure how and if you can use nodejs export plugin thing for hosted games on browsers tho...like the HTML5 thing, but u can use html5 / javascript to do the same thing.

    you just code the same as you would in a web aplication in the script part.

    hope it helps.

  • if u dont want to use families, u can use frames in animations, and have 1 object with different frames, and use if mouse is over this object then set elevation to 2 if its not over this object then set elevation to 0

    as all ur buttons wont require to be individual items, its all 1 ... no more 1000 objects for buttons etc. 1 button doing everything.

    the only complex side will be in events. ul have to identify each button by frame number or local variable and check if user click the button with frame 1 or frame 2 then open shop or close the menu etc... is simple... and more eficient then famillies.

    but famillies are better way of doing thins if u really need to have multiple sprites/objects that are different.

    if u dont require different objects, u can merge them in 1 animation and use frame counting. dont forget to disable animation speed for the animations so the buttons dont change frames.

    families are more for "collision detection objects"

    for example i have a door, and i have a wall, and then i also have an enemy bullet.

    obviously i can merge the door and wall toghether... but then again if i want to animate the door to open close i need it to be another animation entirely or easier a different object.

    so u place all in 1 familly, and then u can tell ur player "if u hit this familly u dont move or u get hit etc"

  • u got to give the player a main position on a circle first, if its top down u can use the gravity "spin" around a planet tutorial that is like a decade and little over old...

    but basically u get a center point, and then for movement u just use X = circleCenter.X+cos(loopindex*N)*angle*dt

    Y=circleCenter.Y+sin(loopindex*N)*angle*dt

    i dont recall the formula exactly but was something like that.

    and to have the character move with it you have to disable the rest of position controls of the character, maybe a special localnumber or boolean on character, that swaps states from "walking" to "moving in circle" doesnt really matter the naming.

    as per "walking" u would enable ur regular controls

    if is not "walking" then it means he is in the circle states and then u disable the regular controls and enable the positioning based where he is at in the circle.

    or u can simply use Pin behavior angle and XY.

    but remember disable the other control methods before u pin.

    and will only work if ur circle is actually changing angles aka spinning if its a "spining animation" ur object doesnt actually spin so ... ur character will stay in place not doing nothing.

    see if this helps

    drive.google.com/file/d/1cdSxOkltTVxp6ONy7HkNeR0H5qLULayN/view

GeorgeZaharia's avatar

GeorgeZaharia

Member since 30 Jun, 2014

Twitter
GeorgeZaharia has 36 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x9
    Popular Game One of your games has over 1,000 players
  • x21
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x2
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies

Blogs

  • Construct For Dummies - Simple Tutorial Collection

    I scour the Construct forums for users tutorial requests, and create small quick and simple tutorials using Construct's defaults features so anyone can use and apply them.

  • My Dev Logs

    Thinking on games 24/7 is fun and waste of time and unproductive if we don't bring those game ideas to life. In this blog im bringing my game ideas to life and log their development process.