• 0

    posted a message on Z - ground height

    It's still wiggling. Less so, but wiggling nontheless. I give up for tonight. Toooo frustrating.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Z - ground height

    Problem is that

    (height of point) returns a real value that is the distance from the ground to the point.

    (height at point) returns the ground level, which is what you set when you set the 'base height' in the new map dialog.

    So the height of point doesnt take into effect the height at point, it just takes into effect how far from the ground the point is.

    By measuring the ground at point 1, and the ground height at point 2, and subtracting the two you SHOULD get the difference in height. If point 1 is the current pos of a projectile and point 2 is the next point in the trajectory, then by setting the height of the projectile to (x - ((height at 1) - (height of 2))) when it moves from point 1 to point 2 should produce a level trajectory of height 'x' , with no variation in height due to terrain. But it doesn't.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Z - ground height

    Does anyone know how to set a z value to ignore terrain? I'm trying

    Variable - Set Destination = (Point((X of Horizontal destination), (Y of Horizontal destination), (9.0 - (Ground height at Horizontal destination))))

    where the default height of the map is 8. so this should create a point that stays at the same point vertically even if its location is changed laterally so that it is over terrain with a different height. It wiggles, dammit! it will not stay at the same height no matter what I do, it's the weirdest thing.

    Anybody see what I'm doing wrong/have a workaround? the idea of having z values be linked to terrain height is seriously stupid, I gotta say. I understand it's a tiling model rather than true 3d, but still. The math above should work around that, and it doesn't.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How do you make squads?

    I'm taking a guess here, but I'd say it depends on some conditions.

    If the captain is identical as far as unit type statistics (HP, abilities, model, etc) then simply designate whichever unit in the squad has the most remaining HP to be the new captain.

    If the captain is 'special', meaning he's got abilities the other units don't have, then:

    When the squad is build, create a integer variable that will be the squad's count. Then while the count > 1, make the captain unattackable. So basically as long as there's a non-captain unit in the squad, the captain will not be attackable. This will have the visual effect of enemies preferentially targeting the non-captain units in the squad, because the player won't know that the captain is actually unattackable. Then, when the unit count = 1, make the captain attackable. Meaning once he's the only dude left, then he'll get attacked.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline Z axis workaround/attachment point height

    What would solve this is a way to get the height of an actor. Anybody know how to do that? Would custom script be needed?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline Z axis workaround/attachment point height

    Also once I get the AI fully implemented I'll post up a tutorial about that as well. The purpose of the AI is to have computer controlled enemies shoot at the player with the traceline function rather than the usual attack. In other words instead of the units just doing the normal attack which always hits th player units, with the AI they will actually shoot projectiles out and thus can miss or not depending on the player moving or taking cover.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline Z axis workaround/attachment point height

    Okydoke. FPS/TPS = lagg apparently:

    -doesn't solve my att point location problem.

    -isn't helpful reply

    -doesn't seem to be the case on my machine and I'm running SCII on a goddamn macbook for chrissake.

    so therefor that reply is fail.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline Z axis workaround/attachment point height

    Oh and as for why I chose to measure from the ground to the center att point and then double is because some units apparently don't have a head att point. Like the marauder I believe. So if that unt type was fed into the hit detection operator then it would make errors if it was the head specified but the head didn't exist. and the overhead point is too tall relative to the unit. whereas the center is literally in the exact center, so doubling its distance should equal the height at least well enough for my purposes.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline Z axis workaround/attachment point height

    Blah. The issue appears to be that the 'unit attachment point' function is not passing anything to any other part of the trigger. No matter what I do the real value for the height of the att. point will not pass as a parameter to anything else.

    I find it absurd that there's no 'set point to actor location' type thing here. That would let me stick an invisible dummy actor onto the att point and then get its position that way...

    I know I ought to give it up and just put in values manually, but the elegance of having unit height detection built right into the unit hit detection operator is just too attractive..

    I'll get on the traceline tut. later. The one you linked to seems awfully complicated to me, though that one might be less laggy that mine in MP. I wouldn't know since this is single player for now. Mine doesn't use any coding, it's all just custom actions and custom functions ad the camera rig.

    Summary of it is basically there's a periodic event that begins to trigger when the gun shoots. When the key to fire is pressed it takes the camera's pitch and yaw, and then it basically gets the sine and cosine of the camera pitch angle. You can easily modify the pitch angle before feeding it to the tracefunc so that you can have the trajectory angle be, say, lateral relative to the ground when the camera has a slightly higher angle or watev. Anyway so then get the sine and cosine: http://www.mathsisfun.com/geometry/unit-circle.html of yer angle and then multiply those numbers by some sort of modifier, and you'll have the horizontal (cosine) and vertical (sine) distance that the bullet will travel in order to go 1 unit in a given direction. after that it's just a matter of implementing graphics etc.

    That was probably not altogether too clear, so I'll still put up a real tut rather than random babbling

    Anybody on the att point problem? this is a rather curious problem I think.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline Z axis workaround/attachment point height

    You know it's interesting you ask that. I thik I should mention that as soon as this height of the center att. point thing is worked out I'd like to put out a beta version of the system. And once the AI system I'm working on and the camera pathing blocker system are done I'm putting out the system as a generic FPS/TPS engine for lazy and/or inexperienced at triggering/map making to use/learn from.

    The whole reason I decided to make my own system rather than using one of the ones that have been distributed for other people to use is because the two I downloaded.. well they sucked the big one. That's not to say there aren't good FPS/TPS system maps available, it's just to say I didn't find any. The reason I needed such an engine was because I have such a gameplay segment in one of my campaign maps I'm working on.

    Anyway, yeah, I'll definitely write up a traceline tutorial once I figure out this question here in the thread. My traceline has ground impact and unit/destructible impact operators, and has different custom functions for 'instant' weapons like a sniper rifle where there's no bullet displayed, and projectile-based weapons. I also have a WIP function for area of effect weapons that are constant, like a flamethrower.

    Thanks for the suggestion though dude, even if you're a noob that's what this place is for: advice. After all, with my postcount of 2 I count as a forum noob here myself. As for the suggestion, I investigated that option already earlier today and it's not the solution apparently.

    The thing is that there's a function for unit attachment point. My testing trigger is as follows:

    UI - Player Any Player presses 1 (Key) key Down with shift Allow, control Allow, alt Allow
    -
    UI - Display (Text((Height of (Marine [45.07, 63.06] attachment point ("Center")))) with Any Precision decimal places) for (All players) to Subtitle area

    Obviously not implemented into traceline yet. Point of the trigger is to figure out what action will output the value I'm looking for.

    So anybody else got an idea?

    [/code]

    Posted in: Miscellaneous Development
  • 0

    posted a message on Traceline Z axis workaround/attachment point height

    Hey everybody. I'm working on a FPS segment in a map in a campaign I'm workin on. I've got the camera setup, the traceline functions, the WASD, the works. My issue is this. I looked around and saw some other people had the problem where the traceline returns an XYZ but detecting a unit hit only provides the X and Y of the unit. Thus if you shoot over the unit's head it still registers a hit.

    The only suggestions I saw to resolve this were to either set values for unit 'height' manually or use the radius as a rough value. And to be clear when I say height I'm referring to the distance from ground to top vertex of the unit. In other words the vertical dimension of the hit detection bounding box.

    Well I have a theoretical solution. Measure the height from the ground to the 'center' attachment point, then double. Voila, no need for manual z value input BS, and definitely no need to use radius (the poor tanks!)

    Problem is this. I can't get the height of the center attach point! I've been at this for about 5 hours now, reading tutorials and such, but I still can't figure it out. Does anybody have even the slightest idea how to measure the damn height of a unit attach point? Said person would be obviously awesomest person ever...!

    I will say though I'm not super familiar with the whole actor system, so s'cuse me if it involves the actor system and I gotta ask for clarification.

    Thanks@

    Posted in: Miscellaneous Development
  • To post a comment, please or register a new account.