Is it possible to have ships not pass over land?

Started by Nicant, September 24, 2016, 12:10:55 PM

Previous topic - Next topic

Nicant

Is there anyway to make the ships not pass over land? Is there any PRPL commands to make it happen? Because i am making a map which involves ships not going past land. Any help will be appreciated. :)
CW4 hype!!

TheWife

I second that. I had an idea for a map earlier I pushed away due to the fact ships can fly over anything.
We have different kinds of struc already, so maybe an EMP type? :D

chwooly

You could always do a map that where the land starts on an edge, The ships won't fly over land if there isn't open space for it to go to.
I am free, no matter what rules surround me. If I find them tolerable, I tolerate them; if I find them too obnoxious, I break them. I am free because I know that I alone am morally responsible for everything I do."
― Robert A. Heinlein

Sorrontis

"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

TheWife


GoodMorning

Well, you could PRPL a script to move with a ship bridge and blow it up if the Core hits a land tile...
A narrative is a lightly-marked path to another reality.

Nicant

Quote from: GoodMorning on September 25, 2016, 07:02:37 AM
Well, you could PRPL a script to move with a ship bridge and blow it up if the Core hits a land tile...

I think that is what i am going to do! I will have different terrain in the middle of the "walls". Now the question is, how do i make it without using the reference?
I have already looked at some of Planet Fall's scripts, but that just makes me more lost.
CW4 hype!!

GoodMorning

Get unit coords, GetLand if <-UID DestroyUnit endif

The first part I do not recall the command for, but that should be obvious from one of planetfall's scripts. Or you could use PixelToCell.
A narrative is a lightly-marked path to another reality.

Sorrontis

I would also advise you to do every 2 frames instead of every frame. You'll see an increase in performance without affecting gameplay significantly. This is really relevant when you're doing this with a full fleet.
"If you want others to be happy, practice compassion. If you want to be happy, practice compassion."

Nicant

Ok, thanks everyone! I will try it tomorrow when i have more time! :)
CW4 hype!!

Xeneonic

Quote from: Nicant on September 25, 2016, 09:14:28 PM
Ok, thanks everyone! I will try it tomorrow when i have more time! :)
Alternatively you could consider a feature similar to Mission 15 of the story, where the planet has a big "particle shield" around it's land. You could give the particles that create the shield the same value as the ones that spawn at the _end_ of Mission 16, those particles kill everything they touch really, really fast.

This would also be a great visual cue to the player that it's a dangerous area and you could make an objective too like on Mission 15 where bringing down a building takes out the shield (Or keep it on permanently).