GeorgeZaharia's Recent Forum Activity

  • You do not have permission to view this post

  • Don't know why this didn't appear in my last post, but here is the image with health = or less than 0.

    This also shows the Pixel_Hero's current animation as it switched to Down. It has 4 frames where the last frame he is laying down. It doesn't go through any of the frames.

    line 102, you had 2 conditions, on floor and health <= which health was ok, but platform was not, since your first action was to disable the platform behavior, which would turn the condition platform on floor as false. even tho the character was indeed on floor.

    while the behavior is disabled the condition related to it, it won't disable as well, it will still check for the platform value if its on floor, and since u disabled the behavior you get a NAN there or behavior doesn't exist while condition still exists.

    sorry for late response.

    the solution was to move the "platform disable action" under the down animation or on bottom of the list of actions of that condition set on line 102.

  • I was looking for a way for instance where in my code i currently have; BEN(sprite) set animation to IDLE,

    to instead have VARIABLE set animation to IDLE. this means whatever selection populated and set the variable at the start will always be able to be retrieved.

    I know how to set global variables, but are you able to please show me how to reference pulling it in my action code?

    there are 2 ways ... and i prefer the global variable as is more compact... and streamlined...

    the other one just duplicates events, and from 50 events for character animation/movement your might end up with a cluster of 1000 or more... depending on how many characters you have in selection menu.

    sure there is the array way, the json way etc... but to keep it simple... 1 global variable + 1 sprite with multiple animations is my solution...or choice...

    now personally i know it might be counter intuitive if you have 10 character sprites... and they look different, id just have 1 sprite with 100 animations or how many animations 1 character needs

    and just rename the animations based on character value selection, like lets say ben is nr 1 ... considering everything in construct starts from zero 1 would actually be sort of object nr 2 doesn't make any sense in this mention since i would rename the animations like

    jump_1

    idle_1

    die_1

    walk_1

    etc...

    and just change the numbers... now when you select the animation to play just set on your keyboards eevents

    on left (trigger once) pressed character set animation to "walk_"&characterSelection (global variable)

    etc ...

    this way you eliminate having 100 sprites for each character selection... you sort of streamline the character being 1 object, and reduce the number of events/behaviors/actions to 1 sprite instead of 100 which is going to be events N*100 characters in duplication code... they will work... either way... just long run project is going to be insane to go back and make a change to each character you have in selection screen, especially once your projects comes close to release product.

    Edited: on the other hand... you can diminish the character animations by using spriter or spline animations... use the global variable... and assemble your characters from parts and reuse the same animation on all of them, as at this point animations are skeletal based and not frame dependent.

    but if you have 1 character design and you just change the color of them... like red mario purple mario green mario... i would just HUE effect and keep 1 sprite.

  • P.S I was going to attach my c3p file but it appears I can do everything but :P

    Regards,Ronnie

    Hi Ronnie, For everything above, GUI going AWOL and others things stopping for no reason, this might be as calminthenight said user errors, coding errors in your project, your keyboard or mouse (if they are wireless, going bananas -- it happened to me so many times), or you are using a BETA version, in truth all BETA construct 3 versions i tested, they tend to brake stuff, either the animation editor crashes or the menus just goes nuts on us ...but if you move to STABLE... you should be fine... believe me the errors u just mentioned above i never encountered them and im playing a lot with C3 both BETA and STABLE, as i said most of times is my devices that i use... or my code... especially if the animation stops middle of action that means your animation is repeating 5-6 times, but is not looping... so in Construct there is speed animation loop and repeat... you will be thinking but what is the difference between them well... if you click loop, and is a loopable animation like walking ... it will never stop. if its repeating ... it will "loop" for about 5-6 times or number you inserted and then never play again.

    as for the file... you just need to upload a example of what you normally do as action repeatably before in brakes... like sprite jumping and playing certain animation... we don't need the entire project ... especially if you working from a long time ago on it, but make sure you double check the stuff i said above... devices/beta versions/code.

    but if you manage to replicate the errors and you are sure is not your code or device... i would submit the files you replicate as a bug report, make sure to mention the C3 version you are using.

  • I enabled the behaviour for each one individually, for some reason it doesn't give an option to add dragdrop to a whole family in the family behaviours section.

    that is because you already added drag&drop on individual items... you need to redo everything as familly.. remove all behaviors from "sprites" and add them to the family they are in.

  • you are using a top down view... so you have to alter the Z index... which you have to adjust manually by events there is no behavior that accepts top down view jumps... as far as i know.

    here is a example ZJump you can take the code and implement it in your game. and should work... now for the "fall trough gaps" you do the same thing... but it will be a bit difficult as you will have to either have another object that counts as "the empty fall area" or calculate offset overlap to trigger the "fall"

    keep an eye on that example file in that drive, il work on it later il try add the "fall" also.

  • I'm on construct 2 !

    waypoints or QARP calculation you need to move into an arc of sorts... and u need 3 points of calculation

    AX,AY ,BX,BY, CX,CY by time

    BXBY would be your middle point between start of movement and end ... time would be how fast he should travel that amount of distance

    A would be your starting point and you guessed it C final position.

    here is a AI example using waypoints designed on the screen before.

    and here is how QARP for arc movements and others similar works drag the points to alter the "road wavy pattern"

    you can also calculate the distance pre-hand visually, and add points of positions in ARRAY or json file and when the POLE end area is hit... set the character position toward those positions by using move forward at angle.

    for example

    [0,0= x 300][0,1= Y 300][1,0= x 400][1,1= Y 350][2,0= x 600][2,1= Y 400]
  • You do not have permission to view this post

  • 1 So I created a simple game where the player can shoot a laser that locks on to the targets and destroys them after a certain time. However whenever I recast my laser after I destroyed all the targets, it keeps locking on to (0,0), even though nothing is there. I of course thought about putting another condition using 'AND' conditions so that the laser only fires when targets exist, but that wasn't possible because there was already an 'OR' condition there. Please help.

    2 Also I have another question: How do you distinguish each object? So originally I thought of casting the lasers to only the targets within a certain distance from the player, but I didn't know how to let the game distinguish the targets that are within the distance, so if I set the action to destroy the targets, it will literally destroy every target in the whole game. There definitely must be a possible way but I can't figure it out... please help.

    on the #1 question, the turet is reseting to 0,0 cause your code has no default value to target if has no target in sight, you need to do something like if enemy.count <=0 set target to self.x,self.y or something like that or aim it at the center of screen set target to X originalwindowwidth/2 Y originalwindowheight/2 that is dead center of the screen.

    on the #2 you need to use for each enemy loop.

  • Thanks i just had to add waitxloopindex

    Thanks

    wait*loopindex, might not be the best approach if im not mistaken... i hope i am.. all the bellow conditions will wait *loopindex not just the actions in the loop you created.

    this was a known "issue" or mechanical thing since construct classic, i don't think it changed.

    how are other conditions under the loop firing?

    i would do a object.variable, and set it to 1 by loopindex for each object and use the wait time trigger behavior.

    and then on a separated condition trigger

    if object.variable =1 set timer to 1 second

    subevent

    if object.timer = true

    ibject.opacity<100 set opacity to self.opacity+10

    then another condition control on a new line

    if object.opacity>100 set variable to = 0

    this approach avoids having to delay the rest of the event sheet code bellow your wait*loopindex ... again maybe that changed... but i remember that was a big issue, especially when you have animation parts or collisions needing to happen instant.

    Reason for that being you are telling the "system" to wait not the object.

    i would do you a example of my code above, but since google drive doesn't wanna directly connect to my construct .. im lazy to manually upload it.

  • dont think is a way around, but if you plan to use a familly and have the same behavior used on the individual members just add it to the familly directly, and eliminate the individual behavior on members of familly...

    this way you can say "familly.behavior" do something but you can also say "sprite1.behavior" do something... if you want to use each member individual with that behavior.

    sadly as the user above i never used tween... so im not really into the "know" on why it doesn't allow u to add 2 behaviors... for other behaviors the behaviors is just renamed to behaviorname2 or something like that... maybe tween doesnt have that feature yet implemented... might in a beta version or something...

  • Thank you very much.

    But it doesn't work with sprites ...

    Edited: just tested it out, works on sprites also on my side.. just add physics behavior ...

    make sure you use collision polygon on physics behavior ... right bellow of immovable checkbox. it works perfectly here... in the latest stable version.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
GeorgeZaharia's avatar

GeorgeZaharia

Member since 30 Jun, 2014

Twitter
GeorgeZaharia has 35 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
  • 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.