Home   Help Search Login Register  

Author Topic: Working Elevator and Flashbang  (Read 1333 times)

0 Members and 3 Guests are viewing this topic.

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Working Elevator and Flashbang
« on: 07 Jan 2005, 18:43:49 »
Hello,

I am creating a bunker and positioning various objects using the setpos command.  However, the command does not seem to be very reliable.  

If i setpos an object that is 5 m high to 20m:
(this setpos [getpos this select 0,getpos this select 1,20])
I am able to setpos another object of the same 5m above and the objects will touch.

However, occasionally this is not the case - the second object appears much higher than the first.  The objects are exactly on top of each other, but despit much fiddling of the value of the height of the upper object, I cannot make them touch.

Is there any possible solution for this?
Has anyone had this problem before?

Sorry if this post seems badly worded - the problem is difficult to understand unless you've had it yourself.

Help on fixing this so that the objects will touch is much appreciated.

angusjm.
« Last Edit: 16 Jan 2005, 17:47:25 by angusjm »

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Setpos and heights
« Reply #1 on: 07 Jan 2005, 21:58:24 »
what you are experiencing is clipping. OFP has a huge clipping problem, i don't think there is anything to be done about it

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Setpos and heights
« Reply #2 on: 07 Jan 2005, 23:48:09 »
I was afraid it might be something like that  :(

Is there no workaround at all?

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Setpos and heights
« Reply #3 on: 07 Jan 2005, 23:50:03 »
what are you trying to do exactly?

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Setpos and heights
« Reply #4 on: 07 Jan 2005, 23:51:15 »
Well, i dunno if you've heard of the mapfact bunker addon, but I'm using pieces of that to make a working elevator.  It currently goes to 7 floors, but I cant get it any higher without the pieces jumping about  :(

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Setpos and heights
« Reply #5 on: 08 Jan 2005, 00:20:53 »
you could try keeping them on a really fast setpos loop
something like....  .0001
the fastest you could do is .000001

to avoid problems, heres what i would suggest:
start with just one object at the position you want, and the other somewhere else, then exec a script that will get the correctly placed one's pos (getpos) and use it to set both of them in a loop going really fast


Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Setpos and heights
« Reply #6 on: 08 Jan 2005, 14:55:37 »
Wont that be really laggy - how laggy are superfast loops?

Never mind, doesn't work anyway - any suggestions?
« Last Edit: 08 Jan 2005, 15:10:33 by angusjm »

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Setpos and heights
« Reply #7 on: 08 Jan 2005, 22:50:20 »
how slower your loop how less lagier. No delay (e.g. ~0.1) will use all your comp speed and will make it really slow. I havent had this problem before and I dont have mapfact bunker addon. If you could specify us what object you are using we may know it. Please tell us the objects.
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Setpos and heights
« Reply #8 on: 08 Jan 2005, 22:54:22 »
0.1 definatley ain't the fastest your computer can do, unless you got some old 50's computer or something. ;D

I don't think it's the specific objects that causes the problems. More like OFP's physichs.

:beat: *Gets Shot* :beat:

Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Setpos and heights
« Reply #9 on: 08 Jan 2005, 23:04:21 »
hmm nice... dmakatra is quickly replying to all my posts :o.. Duuh I dont have an old computer. Im gonna get a radeon x800 sometime.. in uh.. 1/2 years maybe :P? My radeon 9600xt runs fine on all those new games like half life 2 and doom 3!
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Rokket

  • Guest
Re:Setpos and heights
« Reply #10 on: 09 Jan 2005, 02:18:42 »
Working elevator is cool, good idea.

I can't help with your specific problem but have an alternate idea:

can you teleport the player (or other unit) to a fixed, duplicate elevator?
They get in, select floor, pow, teleported to another identical one and step out... Not as slick and cool as a moving lift, but then again, no messing about with keeping it together as it moves...



Offline OFPfreak

  • Members
  • *
  • Who is da operation flashpoint freak now, freak?!
    • OFP NFS mod
Re:Setpos and heights
« Reply #11 on: 09 Jan 2005, 21:32:11 »
awww nice idea! right something like this?
firstly "the model of the elevator" has this in its init:
this addaction ["open doors","opendoor.sqs"]

then make a script that opens the doors, and then somewhere further at the end of script put: elevator1 addaction ["close doors","closedoor.sqs"]
and on the end of this script you put eleveator1 addaction ["level 2 (for example)","level2.sqs"] and that makes you go to the top without forgetting to close the doors :P... frustrating yet ;D?
ofp nfs REBORN! All new nitro, neon, customized cars, off-road, on-road, rally, bikes, racer models and more!
ofp nfs's homepage

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Setpos and heights
« Reply #12 on: 15 Jan 2005, 20:59:21 »
Allright,

I have a working elevator.  The bunker here is not finished, but anyway.



Here's a picture of the elevator in the bunker.  If you want to call the lift to whatever floor you are on, go to the edge of the right elevator door and use the action menu to call the lift.

When you're in the lift, move to the back and choose the floor you want to go to.

N.B I dont have the oxygen skills to make a flat object with a button texture (for calling the lift), but if anyone could make me an object (about 20cm by 20cm by 1cm deep) and texture one side with a green button or something it would be appreciated.



Here's the "Bunker".  You can see its not finished.  The doors on the left can be opened by going up to them, and the basement floor has been completed.  The left hand tower is the lift shaft, and the right hand tower is a guard/control tower accessable from the roof.  The "clipping?" problem is highlighted here.

http://www.gradient-hosting.co.uk/flash/Combi.bas_i1.rar

Here's the link to the sqm and related scripts.

You will need:
BAS Opfor/Tonal (possibly some other bas stuff as well)
Mapfact bunkers (included in the rar)
My own script addon (included in rar, see note)
Keg's Editor Addon

NOTE:
My AJM.pbo addon is completely for testing purposes only.  Please do not load it when you are playing anything but this test mission as it may not work very well.  It includes a semi-working flashbang addon that is still not finished (you are equiped with several flashbangs in the test mission).  This addon also includes several "Cheated" weapons that I have been using for testing, and havent had time to remove, so DO NOT use this addon when playing MP.

Comments appreciated on both the bunker and the flashbang!

angusjm.

P.S  These files contain all sorts of scripts and works from various people from the OFP community.  Special thanks goes to Mapfact for the bunker addon.
« Last Edit: 15 Jan 2005, 21:02:38 by angusjm »

Offline angusjm

  • Contributing Member
  • **
    • Virtual SAS
Re:Setpos and heights
« Reply #13 on: 16 Jan 2005, 17:44:43 »
Update:  Still having bugs with the tower as shown on the picture.

I'm working on making the flasbang more realistic

Currently, if you (or the ai) are within 8m of the blast, you'll be disabled for a while.

If you (or the ai) are within 20m of the blast and facing it, you'll be disabled for a shorter time.

Testers wanted - have a go please!

Edit: Changed the topic title to "Working Elevator and Flashbang"
« Last Edit: 16 Jan 2005, 17:46:03 by angusjm »