| 11-01-2002, 07:48 PM | #1 |
I'm working on a Predator map, and I wan't the Predetor's Collision off when he's near trees, and back on when he's away, so it could look like he's running through the trees. Anyone know how I would do this. I was thinkin of making it backwards. That his collision is always off expcept when near other units or buildings. |
| 11-01-2002, 08:12 PM | #2 |
Cant u make it just be off collision when it uses a certain ability or something? Otherwise i cant think of any ways except creating regions around the trees so that the collision is turned of when the unit enters the region... ill think of it... |
| 11-01-2002, 09:26 PM | #3 |
You coluld make a custom unit, use a tree model, and make it so they cant be targeted (make them wards?) |
| 11-01-2002, 09:32 PM | #4 |
Periodical trigger (every 0.5 sec or so) that checks if there are any trees around the predator in a certain radius. If there are trees -> Deactivate collision If not -> Activate Easy, but: Make sure that trees and buildings are far enough away from each other. And one thing: The predator could walk through any unit if he's near a tree. |
| 11-01-2002, 10:46 PM | #5 |
Well So far I already have a region around a buch of trees, thats gonna be the predetor's base, where he can heal. But i would like it if he could get collision off anywhere, without me having to make allot of regions. You know what, its not that many regions though. It's a small map, and most trees are spreaded out. I'll probably no more than 10 clusters of trees. I'll probably just do the region thing then. I'll test this when I get home. By the way, is there a way for a custom sound to be 3D. I checked on the "3D" box, but this morning when I tested it, but it wasn't working. The sound was attached to predetor, and suppose to sound when a player gets near him. In my old SC version everyone could here the sound, this time I want it 3D so it makes more sense, that only players around the predetor would hear him, and not the ones all the way across the map. Oh, I hate making long post, but how do u move regions via triggers, I tried it, and even made it a variable. |
| 11-01-2002, 11:27 PM | #6 | ||||
Quote:
Quote:
Quote:
Now that you'v emade it a 3d sfx in the sounds dialog, you'll need these triggers: Attach sound to unit Play Sound <------ Will need to be called whenever you want it to play, it wont loop. Quote:
Make a region, and pop it in a var (i know you said you did this, but bear with me). You then use Region - Move (i think) to move the VARIABLE. Not ethat events which rely on the REGION will NOT effect the MOVED region, only the INITIAL spot (why? long story :D) This means you'll need to do something like: Code:
a player owned unit enters a region / every .5 s if unit is in VARIABLE then events Code:
Sidenote: ---> set gg_rct_Region_019 = Rect( -4832.0, 3840.0, -4384.0, 4224.0 ) If thats possible, then why cant we simply reset the actual jass variable? We'll never know :D |
| 11-02-2002, 12:13 AM | #7 |
I got skulls and stuff like that at the base. I'll try the region thing thing. Another thing, is there such thing as a 1 unit mellee ai, or other kind of ai. In case nobody picks the predetor, or the player leaves the game, the computer could take over and try and kill the Commandos (Swartznegger and crew). |
| 11-02-2002, 12:42 AM | #8 | ||
Quote:
You mean how does the AI go zoom? :D You can start a specific AI script, or you can choose Melle Game - Meelee AI which does that and some other stuff too (more info soon) Quote:
If your lucky, the melee AI will kill them. If your not, you get to script it via TRIGGERS! Examples: Attack to position of unit(random unit from enemies of (this hunter guy)) and randomize that trigger so it doesnt kill the same guy over and over :D |
| 11-02-2002, 07:00 PM | #9 |
SuperIKI had the right idea. Here's the easy way: Periodic event Every .5 seconds Action set doodadtemp = no doodad Group ever destructible doodad within 100 of predator and set doodadtemp = picked doodad if doodadtemp does not equal no doodad, then turn collision off, else turn collision on This isn't a full solution though, because if you tell them to go through the trees while not near the trees, the game's pathing will still try and go around the trees as long as the units collision is on. |
| 11-04-2002, 12:26 AM | #10 |
The computer predator has the ai, but still doesn't attack, it moves to the predetor base and stay's there, I tried triggers and the game crashed. And by the way the 3D sound didn't work cause it was "mp3", when I converted it to "wav" it worked (So much for trying to earn memory). I'll try the tree thing, thanks |
| 11-04-2002, 03:05 AM | #11 |
well since the comp ai is bad, youll need to either: a) write triggers to script it b) write a custom ai script that almost nobody can get working right So on with method A! DO NOT assign a script if ordering units with triggers. Have triggers such as Trigger: random time passes : attack to random player Trigger: my life is under 1/4 my max: run home and heal or use a potion. Be creative! For a real challenge make the computer "search" for the player - ie run around randomly - and follow someone when "unit is not fogged to computer" |
| 11-04-2002, 03:15 AM | #12 |
random unit, right. Thanks |
