Jump to content
Sign in to follow this  
suma

Fence editing

Recommended Posts

We received following question from Mark Dzulko via e-mail. As we did not know answers for all of them, and where we know answer we think it will be better to make them available to all of you, here are the questions. (Knowns answers will follow shortly).

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

1) When I started to use the editor I found a few things very time consuming. One thing is the problem of placing object on the right place. So I started to make a scipt which allows me to place object in the editor and then pick them in preview mode and rotate/ place them where I want. Works good. But the PROBLEM is: It is also possible to pick up objects which are stored in the .wrp file. And their position is still changed when returning to the editor! To reset their position the island has to be reloaded (e.g. by changing to another island and returning). I have seen that the "island- obj" have an Id, where the editor-placed obj have "...NOID...".

QUESTION: is there any way to detect if an obj is local (not in wrp file)?

2) The second time consuming fact of editing was, that when a line of object had to be placed for example a long fence, it took a while to adjust every segment. So my next scipt was an Obj builder. This script takes a game logic obj and builds "obj xyz" along it's waypoints. Works great, BUT while a so build fence is real to the player, the AI seems to be able to walk right through. The Obj (fence) are created by "camcreate". Since I heard about problems with camcreate, so i tried "createvehicle", but this was even worse, since my nice aligned fence was spreaded along it's path. (I think vehiclecreate tries to prevent placing obj to close to each other)

QUESTION: is there a trick to place a "real" fence/ obj?

3) After I had a nice fence, I thought about a mission, where a fenced base had to be intruded. So I made a script which is called cutfence.sqs, it works on "fence2" obj and simply replaces them by "fence2b" obj. (medic action, time dalay, ...)

But it only works on editor created fences.

QUESTION: How are the obj names of the original map "fences" (pletivo)?

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suma @ June 25 2002,09:59)</td></tr><tr><td id="QUOTE">1) QUESTION: is there any way to detect if an obj is local (not in wrp file)?<span id='postcolor'>

I do not think is is possible to check which object is created via editor and which is part of .wrp.

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suma @ June 25 2002,09:59)</td></tr><tr><td id="QUOTE">2) QUESTION: is there a trick to place a "real" fence/ obj?<span id='postcolor'>

Using createVehicle followed by setPos might do the job.

Share this post


Link to post
Share on other sites

When I want to build long fence just place 2 pieces and preview til I think it looks good. After that I just look at the 2 first pieces and try to put the other pices as far away from eachother as the first 2 were, a tip is to zoom til they look like they are attached to eachother.

Share this post


Link to post
Share on other sites

This, I think, is possibly the biggest failing of the mission editor. I mean I can learn scripting and all the other crap but it takes so long to put together a mission which involves placing builings and fences and stuff cause they won't auto-align. Now if you had another class, y'know like objects/camera/ammo etc... you could call it fences and let the editor work it out. I'm sure bis could manage this in an update or something.

Share this post


Link to post
Share on other sites

when i want to place a canon on the overvieuw building, the canon (m101) is in the building. Is there something to set the heigt of the canonso it is on top of the overvieuw building.

tnx

Share this post


Link to post
Share on other sites

I can't remember the command but it does exist. I find the easist thing is to copy it from another mission in the editor. Like gfx's bunkers. Anything where someone has put something on or over something else will be using the command. Otherwise go to http://www.flashpoint1985.com/index2.html

Download comref, I think it's in there.

Share this post


Link to post
Share on other sites

Put this in the units initfield:

this setpos [getpos this select 0, getpos this select 1, 4.2]

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (Suma @ June 25 2002,10wow.gif)</td></tr><tr><td id="QUOTE">Using createVehicle followed by setPos might do the job.<span id='postcolor'>

Suma, you are right, forgot about this possibility.

ok, after trying a while it works now. the problem is, that flashpoint seems to have problems if the fence is directed at a free angle. if it is directed N,W,S or E there is no problem for the AI to recognize it as a real fence (it doesn't matter if placed via 'camcreate' or 'createvehicle', both work!<!--emo&wink.gif

There is still one QUESTION: Does anybody (BIS) know what the obj-name for the "fence2" obj in the wrp file is?

So how can i detect if the player is close to a fence-obj (placed in the wrp-file)?

Looking for xxx :

_obj = nearestobj[_player, "xxx"]

_obj = nearestobj[_player, "fence2"]

works for editor placed fences! But not for "build in" fences.</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE"><span id='postcolor'>

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×