• 0

    posted a message on Data Editor - Creating a Missile

    @xenrathe: Go

    Ah, I misread your suggestion then. I can make the missile move with the data editor, and do damage periodically, and continue moving after hitting a unit. The only thing I can't figure out is how to make the missile only hit each target a maximum of once. I solved this by setting a custom unit value on the missile in triggers, but I can't figure out a way in data.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Data Editor - Creating a Missile

    @ezbeats: Go

    Thanks for the post, ezbeats. Most of the stuff you suggested I have explored on my own, though it is good to hear it suggested by somebody else. The problem I'm having implementing it this way is my projectiles don't travel lightning fast, they're maybe 2 or 3 times faster than normal unit speed. There doesn't seem to be any way to check for a Marker without using a Persistent effect, and using periodic persistent effects means any time I change the projectile distance or speed, I also have to change my persistent offsets and timings.

    I don't feel that I can use the short debuff duration because this game seats up to 14 players, and more than likely at the very least once or twice during the game a player will get hit by more than one projectile at the same time, and they should take damage from both.

    Even still, these solutions just seem very "hacky" to me. I feel the best solution would be to check the {No Marker} validator, but there doesn't seem to be a way to set a marker that it will pick up unless I use Persistent Effect to set the marker.

    @xenrathe: Go

    I already have this system set up similar to the way you're describing in triggers. With 14 players firing projectiles at an average of most likely more than once per second meaning an average of 15-20 projectiles will be in the air at the same time in a 1/32 interval loop, I'm fairly certain it can cause some considerable lag. Even if it's an average of +20ms it's a detriment to the twitchy skill game-type. I'm trying to stuff it all into the data editor.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Data Editor - Creating a Missile
    Quote from Rugvip: Go

    Can't check the editor atm, but what you're trying to do is definitely doable. There's loads of information here.

    I've already looked through all of the search results for "missile".

    Quote from Spassmarine: Go

    @rrowland: Go

    I suggest you take a look at this map: http:www.sc2mapster.com/maps/big-blue/, it features a nice missile setup that should get you started.

    Thanks for the link, but the missiles in this game explode on contact. I have no problem setting up a missile that travels forward and explodes on impact. I am having trouble setting up a missile matching the conditions I stated in my original post.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Data Editor - Creating a Missile

    @rrowland: Go

    Heeeeelp meeeeeee!

    Posted in: Miscellaneous Development
  • 0

    posted a message on Data Editor - Creating a Missile

    In the map I'm working on, Sniper Wars, I currently have a 0.0 recurring trigger running to move my missiles and deal damage. I want to make my map run faster, so I'm looking to get rid of this trigger and create the missile in the data editor. I've been staring at and messing with this data editor for two days now, and I can't figure out how to do what I want to do:

    1. Create a missile at the unit that travels in the direction the unit cast the ability
    2. Travel the same distance regardless of how far away the user clicked. ie, The player clicks directly in front of himself but it continues moving the full 30 meters
    3. Deal damage when it collides with a unit, but continue moving for the full 30 meters
    4. Only deal damage to each unit once

    I have looked through other unit abilities and have tried just about everything I can think of, and I'm pulling my hair out trying to get what I would consider a simple effect to work. I created this effect in under 30 minutes in triggers. Are there any data gurus out there who can achieve this effect? If not, I'm probably just going to abandon the data editor and stick with the trigger. It might lag, but at least it works...

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)
    Quote from M0rt1mer: Go

    The tutorial is nice, however the function is very inefficient. You should create a line between camera position and clicked location and simply calculate distance from this line for every unit in the general area. You would save the 100 loops. (This test the unit position in 2D, to test it's heigh, calculate distance from camera and you the same formula with Tangens you already used, just calculate constant tangens outside loops)

    You're forgetting about terrain.

    Posted in: Tutorials
  • 0

    posted a message on Real# variables
    Quote from Thebillsta: Go

    @rrowland: Go

    aight good to know. wanna elaborate on why its bad?

    As the fastest loop time is 23 loops a second, you'll be running this function 23 times per second. It's not particularly big, but it's unnecessary processing. If this variable is updated once every 10 seconds on average and you are running this trigger 23 times a second, you're doing something 230 times that you only need to be doing once.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Real# variables

    @Thebillsta: Go

    No... Creating a 0.0 trigger to set a variable is BAD. Go with anguule's solution. Or if you want to be fancy, you can make two new functions, IncrementReal(real Input, real max) and DecrementReal(real Input, real min). They check if Input is under/over max/min and if so they return input+1 or input-1 respectively. If not they just return max/min respectively.

    Edit: UsulSK has the right idea.

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)
    Quote from HaVoC373: Go

    ok i fixed the camera looking up but what do you mean by add the camera to a circle. right now i've attached it to a local variable that gives the position of the main unit with an offset. but i have to do that on a 0.0 timer and its choppy as hell. in your video your camera is silky smooth... does that have anything to do with the fact that you used a custom physics engine? or is it just the circle thingy?

    again thanks and any help is much apriciated.

    When I looked at your triggers you were setting the camera bounds to some funky rectangle. Instead of "Region from Rectangle" use "Region from Circle". And make the radius 0.1.

    Posted in: Tutorials
  • 0

    posted a message on Custom Inventory System and UI

    Just a little showcase of my custom inventory UI. It caused me a lot of headaches and I thought it looked pretty awesome, so I wanted to show it off and show that it's possible.

    Edit: I swear I made this in the WIP forum...

    Posted in: Project Workplace
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)

    @Kanaru: Go

    I'm not sure why you're crashing. Disable the effect and sound and shoot a few times and see if it still crashes.

    As for the height of the unit, you need to change

    lp_cameraHeight + lv_traceHeight - lv_unitWorldHeight <= UnitGetPropertyFixed(lv_closestUnit, c_unitPropRadius, true)) {
    

    So that the right-hand side of the condition is the height of the unit.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)
    Quote from HaVoC373: Go

    @rrowland: ok i included my map. still got the same problem i havent added anything fancy like moving yet. i am just trying to get the shooting mechanic to work first.

    Okay. You're passing in the player "0" which is a neutral player, so its pitch and yaw will always be the same. You need to pass player 1. Also, the height you're passing is 4.1 which is the worldheight + 0.1, which is not high enough. The marine is about 1.0 high, so you'll want to make that WorldHeight + 1. If you plan on making your character able to leave the ground by jumping or whatnot, you'll want to make it WorldHeight + UnitHeight + 1. If you change your camera height you will want to adjust the 1.0 to the new camera height.

    As for the error, for some reason you're using the traceline position in your set camera bounds statement, which doesn't make much sense. Set your camera bounds to a circle at the position of your main unit with a radius of 0.1.

    Posted in: Tutorials
  • 0

    posted a message on [Trigger] How to Target with Mouselook (Tracelines)

    @HaVoC373: Go

    gt_Camerafollow_Func isn't one of my functions. Are you calling traceline from it? If so, post your map or the Camera Follow trigger.

    Posted in: Tutorials
  • 0

    posted a message on Item check in Specific Inventory

    @JeffQ: Go

    I can confirm that the inventory system works as an array, where each item is added in the order it is picked up. It does not differentiate between containers, item type or any other factor. It's a pain in the ass but I've worked around it (making my own bad/equipment UIs).

    Posted in: Miscellaneous Development
  • 0

    posted a message on End of CardCraft SC - vote for what to do on cardcraftsc.com

    @BeLugh: Go

    Looking good man, I support this project. I've been a card-playing nerd in a few stages of my life, I might relapse with a good SC2 card map. :P

    Posted in: Project Workplace
  • To post a comment, please or register a new account.