Uglypenguin's Forum Posts

  • How would I keep all the behaviours/LOS events from all going off at once though?

  • I have it identical to that and its not working :/ I dont understand

  • So Im trying to make a skill system. On the start of layout I add skill "Sprint" to your skills, its one of four. Is seems all of them work but this one skill, Sprint. If you drag the events out of the array event "contains value=3" and into the movement group it works. But not if its under the array event. And help? I looked at "arr_Skills" Array on Decode, all events should be working...

    I bookmarked the main events and said how to test the bug/my error above

    https://www.dropbox.com/s/cm0enqevtlec1 ... .capx?dl=0

  • https://www.dropbox.com/s/cm0enqevtlec1 ... .capx?dl=0

    So because the wolf AI got too complicated and kinda out of control so I just disabled it, and put down a quick code for pathfinding to the "Allies" Family. I put what behaviours I could into the Allies family, and the Enemy family is complete with all of the wolf instance variables and behaviours(and renamed them). I made all events that refer to a layouts layers named instead of by numbers.

    I ran into a few issues I cant figure out with the change though, you said I could possibly remove the PlayerReach/NoticeRange/AttackRange by using a distance event and instance variable but I cant seem to find any condition that would work for that. I thought there was a "within distance of" but yeah, I couldn't find it. And then there is the wolves, when my player attacks them I cant just select the enemy(ies) thats overlapping the AttackRange for some reason, I tried a few things but they didn't work. And then there is picking up Items. I put all the PlayerReach/NoticeRange/AttackRange in a container and to spawn on all allies, because I cant find a "within distance of" condition when I pick up an item its only on the condition of "is overlapping PlayerReach" when the NPC reach circle is overlapping one it will pick it up too. Of course this could be fixed by just using seperate circles like I was before, or using the within distance of condition that I cant find.

    Other issues include the NPC animation not working(I tried so many thing I dont know what Im doing wrong), the Wolf AI still being funky, it seems that my players attack escaltes to higher number the longer I attack(Or be in the negatives and add health to the enemy but I have no idea why. I cant always reproduce it either so it may be fixed), I thought I fixed that by resetting the base attack to 10 every time you attack, but it may not function correctly.

    Oh, and let me know if you want to stop helping me out with this! Im not trying to take advantage of you or anything, I seriously appreciate the help, Ive not had anyone yet help me as much as you have. Thank you.

  • So I changed over the wolf AI to a family called wolf. Its... not working right though. I did nothing with containers yet. Do you want to take a look?

  • Thank you for the tips! I tried messing with containers once, what I tested didn't seem to work well so I didn't end up using it after that. I read about families and I think I know how it works now, what I don't understand yet is the containers.

  • https://www.dropbox.com/s/0akbww8zm73pn ... .capx?dl=0

    Here it is. The Enemy is supposed to attack whichever enemy it "sees" or is in range of, after each attack moving to a place around his target and attacking again (surrounding) then being able to acquire a target of whomever he sees (CanSee, CanSeeNpc, enemy instance variables). If the player or NPC get out of range the enemy will search(isSearching), this is a function for each Enemy to go to its target plus in a random vicinity.

    Click on the NPC to have him follow if you wish when testing.

    The player can crouch (crl), sprint(shift), and attack(hold left click).

    The player can attack the enemy and kill him when its AttackRange sprite is overlapping him, it can do critical attacks, and loot the body.

    The enemy can attack the player and NPC when its AttackRange sprite is overlapping the player

    The issue seems to be the conditions, the triggers, my events not being right cause multiple instance variables are going off at the same time for all the enemies. I tried to organize it well so pieces of code are easier to find.

  • I don't know what Ive done wrong. It was working but the more things I try and add to the AI the more it doesn't function correctly. I don't know if you could tackle trying to fix the entire AI for the enemy but some things just aren't working. let me know if I should send the capx, I can give a description of what exactly they are supposed to do.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you for the help, I still do not know everything about C2. I added what you wrote, with a few extra things and it works great! I believe I've learned a bit from this and can reproduce in the future, thank you!

  • What I need help with may have changed a bit, ive been doing a lot to my project. So I highlighted in red boxes the events I'm having trouble with, I tried doing a function instead of just "when isSearching", This actually MAY work for me, but it ends up they "search" for me as soon as the layout starts because the trigger is simply when it can't see me, not after having seen me and then not being able to see me that they start searching.

  • Thank you, but I have found a solution to the problem.

  • So these are very simple problems I'm having I can't seem to figure out. (EDIT, FIXED! JUST THE SECOND PROBLEM) One, I'm trying to make is so if any instance has a boolean set, then an action. But the ANY factor is my problem. It works if ALL instances have it set, but not any.

    Second, I can't seem to trigger an action just once when a boolean is set. It triggers constantly. And to my knowledge the "Trigger once" condition is literally only one time, not once for each time the other condition becomes true.

    Any suggestions? Thanks

  • EDIT- It works! Had a little problem but I fixed it, it works perfect now! Thank you so much for the help!

  • You move over an item in the game window with WASD, press E to pick up. If you go to the menu again and see the item in there, you click to drop. When the item drops I had mixed results of it not dropping and it dropping only one item (if you dropped multiple) and it only being the first frame. My attempts at it have changed a lot so the code isnt the same for me anymore (still havent figured it out) but the code should be under these folders in the Game Code event sheet

    Objects > Chest > CHESTADD