• 0

    posted a message on How to make a map 'wrap around'?

    Also try not to end up having the unit teleport back and forth in a continous loop. So you should teleport the unit a little outside the border regions.

    Posted in: Miscellaneous Development
  • 0

    posted a message on How to make a map 'wrap around'?

    To get a unit to teleport to the other side of the map, first, you're going to have to make a thin region around the whole "border" of your map. Just do a simple "if unit enters region then move instantly to point" trigger, but for the "Point" part of it, use a custom script based on something like this:
    Point( PointGetX( UnitGetPosition(EventUnit() ), PointGetY( UnitGetPosition( EventUnit() ) ) )
    Which works like Point(x,y). So if your unit enter the right region and you want him to teleport to the left side of the map, use Point( 0 , PointGetY(UnitGetPosition(EventUnit())) ), or whatever the X unit is that the left of the map is at (trial and error here).
    The bottom left part of the map is (0,0).

    Or in the gui do a "set variable" action and set a real variable to equal the x/y position, found under the "X/Y of Point" function. Then plug in those variables for the point of teleportation.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Cast a spell pressing a dialog button
    Quote from s3rius: Go

    @ezbeats: Go

    Exactly.

    The splat doesn't appear when a ability is cast, but when it is "selected". This selection can be done ONLY by the player hitting a spell button and cannot be simulated through triggers in any way (at least in no way I know of - and I already know most of the editor ..). So the only way to make a splat appear is to have a player who clicks on the command-card icon. Dummy units, spells or whatever won't help there.

    You're right. It can't be done. I'll stop persuing this at the moment.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Cast a spell pressing a dialog button
    Quote from s3rius: Go

    @kii064: Go

    Yes, that's what I mean with my last post. The cursor splat seems to be attached to the cursor by the even abil.XXX.Cursor. Then, and only then, it gets attached to it. I tried find a different event that you can actually trigger to make the splat show up underneath the cursor, but found none. I also tried attaching the splat through creation parameters or whatever you could call it - to no avail. I spend like two hours searching for a way to do so, but I just can't find any.

    Yep. Same thing here after trying it myself. I guess you just gotta make an actual unit that has the ability with unlimited range and order it to cast the ability through triggers to get it all nice and pretty. Maybe make the unit have the ability but don't have it on their command card so they can't use it themself?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Use an ability with a click of a button

    Check out my solution at this thread
    To make it work for a hotkey, just make a trigger to grab a "key pressed" event (don't really like these) instead of a "dialog item is clicked" event.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Halp! Minor Problem with Upgrading Towers By Standing On Them

    I'm not too experienced with animations, but for the dancing stuff, you could either create a trigger with a "unit enter/leave range of unit" for each of your towers, and when they enter within range, apply a "behavior - buff" to that unit. Likewise, if they leave then remove the buff. As for the buff, make it do nothing and act as a dummy. Let's call it "Dummy Buff" for now. Check its flag to be hidden so it isn't an eyesore. The alternative is to give the towers an aura ability that also applies this dummy buff.
    For the animation part, in the actor of the unit, edit its events. Add "behavior "Dummy Buff" is created" and set its action to play your animation. I'm not sure if choosing "behavior "Dummy Buff" is on" would work better.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Cast a spell pressing a dialog button

    Ok, I haven't tested this but here's my attempt to solve your problem.

    What you want to do is make a button that toggles a boolean variable for a "weapon selection" kind of thing.
    Then for your ability, using psi storm for example, find the effect it calls for. In this case it's "Psi Storm (Persistent)." Remember that.
    Now for the cursor, find the psi storm "actor splat" actor and edit the event. Add a "actor create > create()" and "actor destroy > destroy()."

    Now create a trigger for the dialog item button with a "dialog item is clicked" event. For the actions, do:
    -If (dialog item clicked = psi storm button) { if(bool = true) then (set bool = false; destroy splat actor;) else (set bool = true; create splat actor;) }

    Now for the trigger of the ability, create a mouse click event with the following actions:
    -If (bool = true) then (create "Psi Storm (Persistent)" effect at (mousePosX , mousePosY))

    Pardon my messy pseudo code.

    Edit:
    Ok so I tested it and it works. All except for the cursor splat. Maybe I have the parameters wrong or something. I don't know.
    I attached the map.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Hiding the Level of an Ability

    Sorry I couldn't help you. I never tried making a multi-level ability "linked up" like that... because I don't know how. >_>
    I just create like 3 separate abilities independent of themselves along with buttons and requirements displaying them when the time is right.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Actors

    Oh I think I understand now. You want to make a unit that uses the obelisk doodad model. Since the actor was a "doodad actor" it wouldn't correctly link up to the unit.

    In the obelisk actor, notice the "model" it is set to and remember it. Now go to a unit - let's say a zealot - and duplicate it along with its actors (and weapon/effects if you want it to be able to attack). This will preserve the "unit actor" with all its preset settings all made up already. Now go back to the actor tab and find the "zealot copy" actor that you made. Select and change its model into the model of the obelisk (or whatever else you want). I attached a map.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Hiding the Level of an Ability

    I'm not sure if this will help, but in the learn ability where you list all the abilities to learn, have you tried checking the box "hide count" near the top of the options list after selecting an abillity (it's a bit before you select a button and requirement for the ability)?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Actors

    Are you also duplicating the obelisk unit? Or are you assigning your actor copy to the same obelisk?
    I'm also not sure if a unit can be assigned 2 unit actors.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Most efficient way to level passive abilities?

    I've been using the #1 approach to this and it works. However my problem is with the buttons of different ranks displaying incorrectly.

    What do you use in the requirements to count behaviors on a unit? I tried a: CountBehavior BEHAVIORBLAH CompletedAtUnit = 1, show
    But it doesn't work right. (I don't have access to the editor right now so the above code is just an example)

    Edit:
    I figured it out. Just make a dummy ability like usual and apply it to the "learn" ability. Then make a trigger event "unit uses ability" to catch when that ability is learned. Make sure you choose the ability that is a part of the "learn" ability. After that, just add/remove behavoirs (the buff/aura) to the triggering unit.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Editor Question (Copy abilities)

    Try this: First go to the ability and check to see which effect it chooses to call. (with advanced options showing, it's in the field: Effect - Effect). Then go to your Effects section and duplicate this effect along with its actors.
    Then go back to the Abilities section and duplicate it, and check to also copy the button to make it easier on you to change its button later. In this new copy, set its "Effect - Effect" field to the last effect that you duplicated.

    Some abilities uses certain models of special effects that may or may not look "good" on your unit. I won't go through changing special effects, but I recommend you to go through Riley's ability tutorial to understand how a basic ability is made and each of its components.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Items broken for anyone else?

    I had that problem too. I'm pretty sure it's a bug.
    At one point, it wasn't working at all for me. Then after I worked on some custom abilities and started up the map, the items magically worked for me. But after doing some more work, it stopped working again. Seems random at the moment for me.

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Contest] Unit Spells
    Quote from RileyStarcraft: Go

    kii064, is the orbiting path done via triggers, or via data editor?

    It's done by triggers. By grabbing the casting unit's location and having a variable that increases the "degree" of the orbit, I do some math to calculate where to set the position of the asteroid every x seconds. I could probably do it in the editor now but at that time I didn't know much about doing complex stuff with the editor.

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