Jump to content
Sign in to follow this  
Harnu

Well ain't that the damndest thing...

Recommended Posts

I was messing around in the mission editor.  I have no idea what I'm really doing with triggers and stuff.  So I do some stuff.  I was messing around with a trigger.  Andp ut something in the on activation feild.

Well, this is the result.

http://www.geocities.com/harnu14/Odd.jpg

It's VERY odd.  Becuase I didn't manually add the building there from the .sqm.  After some testing I think I know what happened.  Even more odd, is on the map in the mission editor, the new building appeared as a grey box.  Like it became part of the map.  I rebooted, it dissapeard.  I tried the same thing and it happened again.  Thats when I took the screen shot.

I'll do some more testing.  It's reather weird how I may have bumped into a way to edit Nogova itself!

Odd.jpg

I doubt that will appear either.  So just use the previous link to check it out.

Share this post


Link to post
Share on other sites

If you want to have some fun with this yourself.  All I did was put

this setPos [getPos this select 0, getPos this select 1, (getPos this select 2) + 0]

into the "on activation" feild of a trigger. Then set it to anybody and went in it.

I replaced the "this"'s in the brackets with stuff on the map  To inset that just do "object idnumber" w/o the quotes.  For me, one building appears.  Then I abort to get back to the ME and go back.  Do that a few times and another building will appear.

Share this post


Link to post
Share on other sites

Hey Harnu,

I have been trying to mess with the setpos command to move around streetlamps myself. I could never get the darn thing to show up so I assume it is because I didn't put the third getpos in the array. Too bad I am not home to test this until tomarrow night :/

Someone one warned me though to be careful with the setpos command because the object <number> will be permanently moved on mission load until you restart OFP. This is something I have not tested.

Share this post


Link to post
Share on other sites

I just tried moving a lightpost. well, I tested it at night so I knew where they were. I set the lightpost to move to a sign post nearby. My results were that the Lightpost moved somewhere. It wasn't in its normal spot, but wasnt where I set it's pos. And the actual light itself stayed right in the same spot as it always was. But oddly, the ID # of the lightpoast (161) moved over the the ID of where I set it.

object 161 setPos [getPos object 13761 select 0, getPos object 13761 select 1, (getPos object 13761 select 2) + 0]

That's what I did. The lightpost in the SW corner of Lipany. After I tested, the 13761 looked like 11611 becuase the 161 moved over the 13761 ID.

I'll have to do some more testing.

Share this post


Link to post
Share on other sites

After a few more tests, it seems that only the ID # of the object moves. For instance

object 161 setPos [getPos player select 0, getPos player select 1, (getPos player select 2) + 0]

Will move the ID # to wherever you first activate the trigger. However, the object wont move to you. Just the ID # 161 is again the lamp post in SW Lipany.

Share this post


Link to post
Share on other sites

EURIKA!!!! I figured it out.

object 161 setPos [getPos player select 0, getPos player select 1, (getPos player select 2) + 0]

This will set the lamppost position to you. However, you don't see it becuase it's under ground! It hit me that since we are working with map objects, we need to take elevation into consideration!

So what I did was set the 0 at the end to 130 and placed myself (player) at the 130 elevation marker near the gas station. So I preview, but nothing. Then I looked down, and the shadow of the top of the lamp post!

So then I set it up 5 to 135. The lamp post fianally emerged from the ground! I set the time to late night and the light was with the light post working perfectly!

object 161 setPos [getPos player select 0, getPos player select 1, (getPos player select 2) + 135]

was my final command line. I'm gonna go post this in OFPEC. Woohoo!

Share this post


Link to post
Share on other sites

So far I've tested several objects, houses, street lamps, rocks, forests, etc. Only some of them require you specify their elevation. I'm going to try and make a list of them that do and those that don't.

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  

×