[skip all navigation]

[SOLVED] Drop Pods

Creator: payne
Time: Dec 28 2010, 4:07 am
Topic Locked
Topic Locked
This topic has been locked!
Reason: served its purpose
Closed by: Ahli

Post #1     payne Dec 28 2010, 4:07 am

[Avatar]
Addicted to SEN Games -Add more!-
offlinecontact
Rank: Veteran
I'm trying to simulate the fall of meteorites like in AstroGears.
I believe one good way to achieve my goal is to use the Zerg Drop Pod, but unfortunately, it looks like the Drop Pod action acts extremely weirdly. I've had -huge- problems getting the position of the unit spawned (the meteor) at the Drop Pod's fall location (which is selected randomly via "Random Point of Region"). The goddamn "Position of (Last Created Unit)" would not work, just as so many other ways I've tried did not.

If you guys know exactly how to work with Drop Pods, please help.
Or if you have a better idea as of how to have similar effects as in AstroGears from within the Data Editor, tell me as well.

------------

In AstroGears, the meteors would be blue crystal amalgamations as huge as a Command Center. They would fall from the sky diagonally, leaving some blue explosions behind their flying path as a special effect.
Once fallen, all players would get to see it for a few seconds, thus giving its position to all players. The position of this meteor would also get a Ping on the minimap.

I am currently intending to use the Rich Mineral Field, but if you guys have a better idea, please share.
This post was edited 1 time, last edit by payne: Dec 31 2010, 5:16 am.

Top

Post #2     NicholasBeige Dec 28 2010, 1:52 pm

[Avatar]
offlinecontact
Rank: Regular
Quote from payne
getting the position of the unit spawned (the meteor) at the Drop Pod's fall location (which is selected randomly via "Random Point of Region"). The goddamn "Position of (Last Created Unit)" would not work, just as so many other ways I've tried did not.

well here's an idea...

Set VariableName (type Point) to Random Point within Region A

I'll look into how the 'action' works.

Gone.
Top

Post #3     Roy Dec 28 2010, 7:05 pm

[Avatar]
An artist's depiction of an Extended Unit Death
offlinecontact
Rank: Veteran
Almost all input values in a trigger event/condition/action can be stored into a variable. If you need to use something more than once, store it into a variable.
Quote from Cardinal
I'll look into how the 'action' works.
It would just be the variable name where he's been trying things like (Last Created Unit).

Top

Post #4     Ahli Dec 28 2010, 10:06 pm

[Avatar]
Nothing yet! Almost done. Very powerful, very strong.
offlinecontact
Rank: Elite
Yeah, position of last created unit is buggy, if you just created the unit.
But you can get the X and the Y value of the position. That works somehow. Calling it's position as a point didn't work.

(user posted image)
Top

Post #5     payne Dec 30 2010, 7:21 am

[Avatar]
Addicted to SEN Games -Add more!-
offlinecontact
Rank: Veteran
The following trigger did -not- work. :(

Code

Drop
   Events
   Local Variables
       X = 0.0 <Real>
       Y = 0.0 <Real>
       Point = No Point <Point>
   Conditions
   Actions
       Unit - Create 1 Rich Mineral Field for player 0 at (Center of Region 001) using default facing (Ignore Placement)
       Campaign - Create Zerg drop pod at (Random point in [BR] Meteor Zone) with (Last created units) (Wait until it finishes)
       Variable - Set X = (X of (Position of (Last created unit)))
       Variable - Set Y = (Y of (Position of (Last created unit)))
       Variable - Set Point = (Point(X, Y))
       Region - Move Meteor Reveal to Point
       General - Pick each integer from 1 to 8, and do (Actions)
           Actions
               Visibility - Reveal Meteor Reveal for player (Picked integer) for 3.0 seconds and Do Not check cliff level
       Ping - Ping the minimap at Point for (All players) over 2.0 seconds, using the color (100%, 0%, 0%)

Top

Post #6     Centreri Dec 30 2010, 7:39 am

[Avatar]
If I were as smart as I think I am...
offlinecontact
Rank: Veteran
Cent's complex and probably unnecessary solution: Change the meteor unit's height manually over time. You can simultaneously have it moving along the x,y plane if you want. Triggering.

(user posted image)
Top

Post #7     Ahli Dec 30 2010, 11:09 am

[Avatar]
Nothing yet! Almost done. Very powerful, very strong.
offlinecontact
Rank: Elite
I would use something like this.

Code

   Events
       TriggerAddEventMapInit()
   Local Variables
       point = null <point>
       droppod = null <unit>
   Conditions
   Aactions
       CreateUnitsWithDefaultFacing(1,"ZergDropPod",c_unitCreateIgnorePlacement,1,(RegionRandomPoint(Region 001)))
       SetVariable(point,(UnitGetPosition((UnitLastCreated()))))
       SetVariable(droppod,(UnitLastCreated()))
       Wait(2.6,c_timeGame)
       CreateUnitsWithDefaultFacing(1,"RichMineralField",c_unitCreateIgnorePlacement,1,point)
       Wait(5.0,c_timeGame)
       UnitKill(droppod)

(user posted image)
Top

Post #8     payne Dec 30 2010, 7:24 pm

[Avatar]
Addicted to SEN Games -Add more!-
offlinecontact
Rank: Veteran
Quote from Ahli
I would use something like this.

Code

   Events
       TriggerAddEventMapInit()
   Local Variables
       point = null <point>
       droppod = null <unit>
   Conditions
   Aactions
       CreateUnitsWithDefaultFacing(1,"ZergDropPod",c_unitCreateIgnorePlacement,1,(RegionRandomPoint(Region 001)))
       SetVariable(point,(UnitGetPosition((UnitLastCreated()))))
       SetVariable(droppod,(UnitLastCreated()))
       Wait(2.6,c_timeGame)
       CreateUnitsWithDefaultFacing(1,"RichMineralField",c_unitCreateIgnorePlacement,1,point)
       Wait(5.0,c_timeGame)
       UnitKill(droppod)
:hurr: How do I use GalaxyCode?

Top

Post #9     Roy Dec 30 2010, 7:38 pm

[Avatar]
An artist's depiction of an Extended Unit Death
offlinecontact
Rank: Veteran
Quote from payne
Quote from Ahli
I would use something like this.

Code

   Events
       TriggerAddEventMapInit()
   Local Variables
       point = null <point>
       droppod = null <unit>
   Conditions
   Aactions
       CreateUnitsWithDefaultFacing(1,"ZergDropPod",c_unitCreateIgnorePlacement,1,(RegionRandomPoint(Region 001)))
       SetVariable(point,(UnitGetPosition((UnitLastCreated()))))
       SetVariable(droppod,(UnitLastCreated()))
       Wait(2.6,c_timeGame)
       CreateUnitsWithDefaultFacing(1,"RichMineralField",c_unitCreateIgnorePlacement,1,point)
       Wait(5.0,c_timeGame)
       UnitKill(droppod)
:hurr: How do I use GalaxyCode?
That's what the triggers look like when you view raw data (hotkey Ctrl+D).

Top

Post #10     payne Dec 30 2010, 7:46 pm

[Avatar]
Addicted to SEN Games -Add more!-
offlinecontact
Rank: Veteran
Quote from Roy
Quote from payne
Quote from Ahli
I would use something like this.

Code

   Events
       TriggerAddEventMapInit()
   Local Variables
       point = null <point>
       droppod = null <unit>
   Conditions
   Aactions
       CreateUnitsWithDefaultFacing(1,"ZergDropPod",c_unitCreateIgnorePlacement,1,(RegionRandomPoint(Region 001)))
       SetVariable(point,(UnitGetPosition((UnitLastCreated()))))
       SetVariable(droppod,(UnitLastCreated()))
       Wait(2.6,c_timeGame)
       CreateUnitsWithDefaultFacing(1,"RichMineralField",c_unitCreateIgnorePlacement,1,point)
       Wait(5.0,c_timeGame)
       UnitKill(droppod)
:hurr: How do I use GalaxyCode?
That's what the triggers look like when you view raw data (hotkey Ctrl+D).
Ahli, mind pressing "Ctrl+D" so I can see it in the format I am used to see it? ^^

Top

Post #11     Ahli Dec 30 2010, 8:23 pm

[Avatar]
Nothing yet! Almost done. Very powerful, very strong.
offlinecontact
Rank: Elite
Quote from payne
Quote from Roy
Quote from payne
Quote from Ahli
I would use something like this.

Code

   Events
       TriggerAddEventMapInit()
   Local Variables
       point = null <point>
       droppod = null <unit>
   Conditions
   Aactions
       CreateUnitsWithDefaultFacing(1,"ZergDropPod",c_unitCreateIgnorePlacement,1,(RegionRandomPoint(Region 001)))
       SetVariable(point,(UnitGetPosition((UnitLastCreated()))))
       SetVariable(droppod,(UnitLastCreated()))
       Wait(2.6,c_timeGame)
       CreateUnitsWithDefaultFacing(1,"RichMineralField",c_unitCreateIgnorePlacement,1,point)
       Wait(5.0,c_timeGame)
       UnitKill(droppod)
:hurr: How do I use GalaxyCode?
That's what the triggers look like when you view raw data (hotkey Ctrl+D).
Ahli, mind pressing "Ctrl+D" so I can see it in the format I am used to see it? ^^
No, because then you will see what my German triggers look like.
That wouldn't help you unless you understand German. That trigger already gives you every information you need. :)

Short explanation what the trigger does:
Create 1 droppod @ random point, locally store point and droppod unit, wait 2.6 game seconds, create rich mineral field (ignore placement), wait 5 game seconds, kill droppod unit.

(user posted image)
Top

Post #12     payne Dec 30 2010, 8:31 pm

[Avatar]
Addicted to SEN Games -Add more!-
offlinecontact
Rank: Veteran
"droppod" represents the unit that is spawned by the Drop Pod or the Drop Pod itself? :O

EDIT: I see you manually create the Rich Mineral Field after calling the Drop Pod. Am I supposed to understand that your Drop Pod isn't dropping any unit?

Top

Post #13     Ahli Dec 30 2010, 9:37 pm

[Avatar]
Nothing yet! Almost done. Very powerful, very strong.
offlinecontact
Rank: Elite
Quote from payne
"droppod" represents the unit that is spawned by the Drop Pod or the Drop Pod itself? :O

EDIT: I see you manually create the Rich Mineral Field after calling the Drop Pod. Am I supposed to understand that your Drop Pod isn't dropping any unit?
I'm creating the unit manually because I don't have your trigger action. I don't know where you got that. :S
And obviously my method is working for triggered spawns... :)

(user posted image)
Top

Post #14     payne Dec 31 2010, 4:05 am

[Avatar]
Addicted to SEN Games -Add more!-
offlinecontact
Rank: Veteran
Quote from Ahli
Quote from payne
"droppod" represents the unit that is spawned by the Drop Pod or the Drop Pod itself? :O

EDIT: I see you manually create the Rich Mineral Field after calling the Drop Pod. Am I supposed to understand that your Drop Pod isn't dropping any unit?
I'm creating the unit manually because I don't have your trigger action. I don't know where you got that. :S
And obviously my method is working for triggered spawns... :)
I though Drop Pod worked this way: you create a unit somewhere, and tell the Drop Pod to drop at some point with Last Created Unit. :/

EDIT: Everything worked perfectly.
Thanks. :)
This post was edited 1 time, last edit by payne: Dec 31 2010, 5:15 am.

Top
Topic Locked
Topic Locked
This topic has been locked!
Reason: served its purpose
Closed by: Ahli
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)


[10:34 pm]
Dem0n -- disgusting state XDD
[10:33 pm]
Echo -- Ty Lil-Inferno. I'm cumming to New Joisey.
[10:12 pm]
lil-Inferno -- Old-ass raggedy-ass motherfucker
[10:12 pm]
lil-Inferno -- hapi birfday ecko
[10:06 pm]
Echo -- Thank you jiffy
[10:06 pm]
Echo -- Cut off my years, since I am a year older.
[10:04 pm]
jjf28 -- happy birthday (insert name of people with birthdays today)
Please log in to shout.