Rafiki
  • Rafiki
  • 53% (Neutral)
  • Private Topic Starter
17 years ago
I'm new to scripting on maps and I have been trying to make some walls show up when a building has been entered.
I wrote a script that if any of the 8 players player0 through player8 enters the building to spawn the wall and it works. However the wall can be driven and walked through by all the units, and i have tried raising and lowering it alittle bit and it makes no difference all the units just walk/drive right on through like its not there, even thou you can see it, and can even put inf inside of it!
I'm lost as to what to try next?!
Sponsor
Me Myself and Pi
17 years ago
Well one thing you could try is placing a water terrain around the building. Then lower it below the ground. Now, when you have the building garrisoned, just raise the water terrain to about, 99999ft. This will bring it up beyond the camera & the players won't know it. This will prevent units from going into the area.
Rafiki
  • Rafiki
  • 53% (Neutral)
  • Private Topic Starter
17 years ago
I will give that a try, but it seems like a really odd way to do it. Should spawned building be "invisable" like that as far as driving through them? I have placed a few different types of building and all spawned buildings seem to do that, but the same building that are placed with before the game don't have that problem, does it have something to do with spawning a building, and is that not normally done ingame?
Me Myself and Pi
17 years ago
Well what kind of wall are you trying to spawn? Is it like a small brick wall, or the big fortress walls like on Fallen Empire? If it's the little walls, try placing them on the map to begin with. Then try to have infantry get through it. If they do, then the game might allow units to pass through them if there's no other way.
Rafiki
  • Rafiki
  • 53% (Neutral)
  • Private Topic Starter
17 years ago
I'm spawning the ForbiddenCityWall and if I place it in the world builder instead of part of a script then people and tanks CAN NOT pass through it. Its just want the building is spawned, and it seems to be any building as I have tested it with a few other buildings as well.

I was also wondering:

1: Is there a way to make a "neutral" zone, and area on the map where no matter the team you are on, cant fire when inside that area (not even the force fire with ctrl)?

2:Where do I find the options for scripting to change a buildings health(like heal it) or set it to be target able, or indestructible and some of those other settings you can change when normally placing an object.

3:I have seen in some other topics people talking about some different INI files (Some are just for that map, and others are global it seemed like) to edit and one said something about where they are located (data/INI) but I don't have any files in there. Is there a good tutorial about all the different INI files where to get them, and what they can do?

P.S. Thanks for the help and fast responses!
icewind
17 years ago

I'm new to scripting on maps and I have been trying to make some walls show up when a building has been entered.
I wrote a script that if any of the 8 players player0 through player8 enters the building to spawn the wall and it works. However the wall can be driven and walked through by all the units, and i have tried raising and lowering it alittle bit and it makes no difference all the units just walk/drive right on through like its not there, even thou you can see it, and can even put inf inside of it!
I'm lost as to what to try next?!

Rafiki wrote:



Just a little note, you only have to have script for player0 through player7
You can't blame me for my defeat, it's all the fault of my soldiers.
Making the web a weirder place, one forum at a time.
Derideal web comic.  Try it, it's good.
Me Myself and Pi
17 years ago
Well I'm not sure what's going on. But I am sure that using a water terrain like I described will fix it.
Is there a way to make a "neutral" zone...
No. Not as long as the player controls the unit.
Where do I find the options for scripting to change a buildings health...
There are no scripts where you can repair a unit. You can however, spawn a worker/dozer & then use this action: Player/Repair named bridge or structure. Then you can just tell the player that owns the unit to repair the building.
...or set it to be target able, or indestructible...
That can be done in the Unit/Affect flags set on object panel action.
Is there a good tutorial about all the different INI files where to get them, and what they can do?
There will be one soon. I've been recently asked to make a video tutorial about it. It should be available somewhere on this site when I upload it. But it'll be about a week before I can record it.
Rafiki
  • Rafiki
  • 53% (Neutral)
  • Private Topic Starter
17 years ago
I look forward to the video!

All your ideas worked perfectly! Even the water area with a spawned building, it sucks to have to make a water area for every building but oh well, still works!

Thank you so much!

This may be more of an Admin question, but why is there not a sticky thread with one post that has links to all the main tutorials and other good threads? Like the one about "player#" and some of the other useful ones I have found here? That way there is a good collect for noobs to go and read through.
CommieDog
17 years ago

This may be more of an Admin question, but why is there not a sticky thread with one post that has links to all the main tutorials and other good threads? Like the one about "player#" and some of the other useful ones I have found here? That way there is a good collect for noobs to go and read through.

Rafiki wrote:


We'll do you one better: an entire forum  dedicated to such matters.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
Phe0n1x
  • Phe0n1x
  • 100% (Exalted)
  • Administrator
17 years ago
Not to mention the Generals World Official WorldBuilder Tutorials  submitted by various fans and approved by the staff.


UserPostedImage