lionz's Recent Forum Activity

  • I think Nandynho made it, maybe they can help you.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Loads of ways to do it. I would do it by having 2 global variables and instance variables on the characters for red/blue which you already have. When they pick red add 1 to red global var, or blue add 1 to blue global var. When character dies check their team, compare if its red then subtract 1 from red global var. If red or blue = 0 then the other team wins. You can also use picked count of players with red/blue instance var and use that to compare if greater than 0. The logic applies to any of those combinations given because it's just counting R v R v B or B v B v R, doesn't really matter.

  • Hiya, instead of moving the sprite in that way I imagine you can use the physics behaviour for everything you need. Add physics behaviour to the object and then use actions such as 'Apply force' to move it in a realistic way. 'Apply impulse' can be used if you wanted to have the ball hit something and send the object flying.

  • On start of layout with condition - system compare two values layoutname = "name of layout".

  • I fixed the picking with a function for both methods, you can see here dropbox.com/scl/fi/mofrgpxx8h50o6br0poxj/removedust.capx

  • Im sorry, but it doesn't seem like you gave me much help here? This waiting/roaming option is what I am trying to do, but how to do it is the problem. I just started messing with Construct a few weeks ago and some of the terminologies is still getting used to. The only "variable form" I am finding is the option to add Instance Variables, but that doesn't seem to be the option I want. the AI currently do roam freely, and each individually responds to the player when it is in range (moves in the players direction). I did just check the "Compare Two Values parameter i used for the "Fly to player when in range" function, but that doesnt seem like the right spot.

    I have to make assumptions as there are no events posted, only a description of the issue that occurred. I also made an assumption on your skill level as you look to have implemented something already and mentioned you are making an MMO so I didn't go into detail with the specific how to, only the general. If you're sure that the picking is correct and it's not a problem with actual implementation then I can't help any more with this, it sounds like a bug. I would have to see a screenshot of the events or a shared C3 file to help debug the issue.

    I have this option right now, currently, my mouse controls are as follow...

    • When left button is CLICKED on AI the player is angled to face the monster.

    • When left button is DOWN the player rotates toward mouse position, and finds path then moves along this path.

    I want my player to be able to use the mouse to move the character, but I also want the mouse to be an interactive control used to target enemy AI as well is pick up loot.

    Potentially you could have the main character object that always rotates toward mouse position for movement then have a visual character object pinned to it that either faces an AI if selected or faces mouse position if AI not selected.

  • For the collapse I don't think any code is wrong, it's just missing. When you open it and set the slots to x+200 you need to have the ones that are not active move x-200 on a close. That's about it, so double tap on inventory when inventory open =1, set inventory open = 0 and move the inactive slots -200.

  • Hiya,

    1. That will likely be a picking issue, you can't really say AI do such a thing as it will apply to all AI at once. You need to give them states which can be done in variable form. Try 'waiting' or 'roaming' and say if AI is waiting do this, or if AI is roaming do this.

    2. You can select an AI with the mouse and then set a variable on the AI to true. While this variable is true you set the player angle toward the AI with condition where this variable is true.

  • The problem here is that it's not really a very simple inventory system and you've gone about it in a very visual way which means there are tons of global variables and redundant code. If you are making something like this it would be best to use an array then it can be done in several events, looking at your events it's just too difficult to work out what's going on, also if you plan to expand this in future it is going to be a bit of a nightmare. I would start again with an array where your inventory slots are 0,0 1,0 and 2,0. You can then put the amounts of those items and add to them at 0,1 1,1 and 2,1 which would solve your problem. Then when you are swapping items they move between 0,0 1,0 and 2,0 slot where 0,0 is always the 'active' item. That in itself would also be somewhat difficult for a beginner and if you are new to arrays but hey that's inventories :)

  • Great, no problem :)

  • Ok to run more specifically you can do :

    For 0 to array.width (system loop)

    Array compare at xy 'loopindex' for x, 0 for y. value = '4'

    That will run through all x at y=0. This means it only checks the first row looking for a 4.

    Then when its true you add the curx to local variable against array.at(localvar, 1) to get the amount for 4.

  • Array : Contains Value '4'

    Set local variable to current x

    If array.at(local variable, 1) = 10 then true / log hello

    Array : Contains Value '6'

    Set local variable to current x

    If array.at(local variable, 1) = 5 then true / log hello

lionz's avatar

lionz

Member since 5 Aug, 2013

Twitter
lionz has 73 followers

Trophy Case

  • 11-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
  • Forum Wizard Made 5,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

24/44
How to earn trophies