RhapsodyInGeek's Recent Forum Activity

  • I had a Custom Player Movement thing going on in my game for awhile (though I ended up using 8 player movement). I did get what I think you want accomplished through this:

    Compare: Object[CustomMovement].Speed > MaxSpeed

    --> Set Object, CustomMovement, Change Speed, Set MaxSpeed

  • I think I speak for everybody when I say we're salivating with anticipation. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • So good news! I've solved it, for now.

    I opted to remove the Family completely, then reorder the AI object's PVs into alphabetical order. After that, when I re-added the family "Red" to the AI, when it put in the PVs it ended up in alphabetical order as well, and then they started matching up. It's a bit of a hackaround, but at least I've got it working now.

    Thanks for all the help lately, guys! I appreciate it!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I love Flashback. This is beautiful. I like the style, too.

  • Well, that at least solved the issue of animating them separately, so cheers for that.

    I think what it might be is the PVs not being correctly evaluated. I just remembered a bug way back where testing out PVs on Families wasn't working right because the order in the object wasn't the same as in the Family? I thought that bug was squashed though.

    I found that once I put the "Set Red.Value('Timer') to Red.Value('Timer') - 1 * TimeDelta" into the "Always" position, it was modifying Red's "EnID" value, not "Timer".

    I did another attempt at "Pick by comparison" and input the values manually, and the checking worked. The setting of the PV didn't, but one workaround at a time, I guess.

  • Well, here's the cap:

    http://dl.dropbox.com/u/20459682/eclipse.cap

    The events in question are in the event sheet "Game Systems", they're the last group of events, so they should be easy to find. That's the only spot in the game where Enemies and AI are referenced.

    When you test it for the first time it should jump to fullscreen, which is inconvenient for debugging. You can go to options and mess with the screen settings and set it to Windowed mode. It'll save a config file after you select save settings and then refer to that to restore settings so you only have to set it to windowed once. Clicking and dragging on the screen will let you move it; it's a bit clumsy as I haven't finished that feature yet, but it works fine. You select menu options with the Action key, default mapping is Left Ctrl.

    When you get to the actual map just take a right and you'll see the enemies in question, and their corresponding AI objects (I have them visible for debugging purposes).

    I also highly recommend you "Debug All" rather than "Debug Layout". The game will not work properly otherwise, as it requires a number of arrays and objects and configurations created on startup.

    Hope someone can figure something out!

  • Well it's not an issue with the Families, but with PV picking. Like I said, even if I replaced the "Red" PV checking with the actual object, the results are the same.

  • So I'm working on some enemy AI. I'm trying to streamline a lot of the movement so that I can cut back on events by using families, and using containers to pair up a collider/AI object with my graphic/Stat object so my enemies can have proper collision detection when navigating the environment.

    Enemy is in Family "Enemy"

    AI is in Family "Red"

    <img src="http://img256.imageshack.us/img256/9360/enemyaibugged.png" border="0" />

    The above is basically the template I plan on using to make my enemies perform various actions, up to deciding when to attack the player. The Enemies find their AI just fine, which is great. They stick to their coords and all that jazz.

    Unfortunately, nothing gets detected after that. Any action with a PV checking condition doesn't perform at all. It's not just with Family PV checking; checking the specific objects' PVs yield the same result.

    Moving the movement action outside to "Always" or "At Startup" does cause the enemy to move. Also moving the "Is moving" conditions and animation actions out of the PV check allows the enemy to animate.

    I've tried using "Pick by comparison" to evaluate the PVs, but it ends up picking every enemy who's State is set to "Idle", causing the enemies to try to change animations between their own movement states. It also eventually causes the game to crash when opening a layout with the enemies in it, with no other solution than to delete all events associated with the "Enemy" and "Red" Families. Really bizarre.

    I also tried to pick by adding an additional PV that would pair up the Enemy and the AI rather than using a container, but that didn't work either and just ran the actions for all instances as long as one instance fit the bill.

    A bit frustrating, to be sure.

  • Beautiful, R0J0hound, beautiful! It works pretty flawlessly so far. Can't thank you enough!

  • newt

    I'm not sure what I'd be looping in this case to pick the correct object when there might be multiple instances of it on screen?

    Jayjay

    I knew about the Create Object by Name, didn't know it did that though. It'd be useful if it were just a few guns and all I was doing was a quick Power calculation, but I'm also setting a Character ID, an Attack Type, and an Element, and doing a further modifier on the Power in the case of a certain status condition. Also, your suggestion pretty much equates to the same thing as Example B, except it'd be a bit more unreadable having it all in one long event due to the amount of weapons and variables that are to be involved.

  • So I'm trying to spawn objects by expression to try to streamline my events, but I've run into a little problem. As far as I understand, under normal circumstances when you spawn in object in Construct that object is automatically the one picked for any following actions, which is cool. However, I don't know how to modify that same object if the object created is through a string variable in an expression. Basically...

    I want to do

    Player presses Attack Control

    --> Player create object Player.Value('CurrentWeapon')

    --> Set (Player.Value('CurrentWeapon').Value('Power') = blahblahblahstupidmathblahblahblah

    I don't want to do, but will I guess if I have to

    Player presses Attack Control

    --> If Player.Value('CurrentWeapon') = WimpyGun

    ----> Player create object WimpyGun

    ----> Set WimpyGun.Value('Power') = blahblahblahwimpymathblahblahblah

    --> Elseif Player.Value('CurrentWeapon') = NotWimpyGun

    ----> Player create object NotWimpyGun

    ----> Set NotWimpyGun.Value('Power') = blahblahblah1337mathblahblahblah

    --> Elseif etc..., etc...

    ----> blahblahblahlotsofeventsblahblahblah

    Am I just gonna have to suck it up and make a condition for each object as outlined in Example B? <img src="smileys/smiley19.gif" border="0" align="middle" /> Or is there a way to make Example A work?

  • And... that example .cap... Wow. That is a LOT... And using arrays? That would make things difficult when trying to attack more than one enemy at once.

    Heh, it's not as much as you might think. It's really just using the same checking logic for different parts of the array (weakness, resistance, absorption, immunity). And you don't have to use arrays (though I highly recommend it!). I'm just using arrays for database stuff, things that I don't want to have to change every instance of every sprite for if I want to make a game balance edit, so I can just reference a database entry for it. I'm making an action adventure RPG so it's kinda necessary for me.

    But yea, if you want a complex combat system, you're going to have to get a little complex. The key thing to remember to do is make sure it's readable and organized, or else you'll run into problems debugging later.

    I'm sure tulamide or R0J0hound could find a one condition/one action way to do what I did <img src="smileys/smiley2.gif" border="0" align="middle" /> but the method I threw out seems to work just fine.

RhapsodyInGeek's avatar

RhapsodyInGeek

Member since 3 Oct, 2010

Twitter
RhapsodyInGeek has 1 followers

Connect with RhapsodyInGeek

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies