Home   Help Search Login Register  

Author Topic: TUNNEL! YES! I KNOW!  (Read 1951 times)

0 Members and 1 Guest are viewing this topic.

fragsta

  • Guest
TUNNEL! YES! I KNOW!
« on: 27 May 2003, 01:11:26 »
Ok, I tried it out but the way I do it is wrong. To make an underground tunnel you have to make the effect of an underground tunnel. The way it works is that when you go into a certain trigger, the setpos command will teleport you to a remote location of the map where it is an enclosed space. The entrance can be jazzed up a bit, but do u get what I mean?
The way I tried was by puttin a trigger with condition "this" and activation "anyone" and type "none" (it should probably be switch) and in the on act field I put:

Code: [Select]
this setpos [getpos game1, getpos game1, getpos game1]
game1 is a game logic. My idea didn't work, but am I heading in the right direction? please tell me, and help....please....thanks in advance!

Yahoo

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #1 on: 27 May 2003, 01:49:26 »
In stead of this put the unit(s) name

Cedaie

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #2 on: 27 May 2003, 05:25:27 »
Perhaps instead of running straight in, have an action "enter tunnel" and perhaps have a black out to black in.

then it will move them to the location where it will have the action "exit tunnel"

this way you will avoid any bugs and wierd stuff happening during transition in and out of the tunnels.

Although in MP when people are rushing into the cave under fire, they don't want to be shuffling through the list down to enter the cave.

fragsta

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #3 on: 27 May 2003, 11:36:50 »
but it's a good idea, right?

fragsta

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #4 on: 27 May 2003, 11:57:36 »
ok this is annoyin me now. I can't make it work. How do you get a setpos to make someone move to a game logic? HOW!? tell me.... please...

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:TUNNEL! YES! I KNOW!
« Reply #5 on: 28 May 2003, 03:53:36 »
Here is your problem: You are trying this, right?

this setpos [getpos game1, getpos game1, getpos game1]

What you mean to do is this:

this setpos getpos game1

If you care, I'll try to explain the reason why your way doesn't work. The command "getpos game1" returns an array with three elements; for example, it might return [12,49,23]. The command "setpos" must be passed an array with three numbers in it, such as our example [12,49,23]. You were effectively passing it an array of three arrays, like this:
this setpos [ [12,49,23] , [12,49,23] , [12,49,23] ]

Hopefully that made sense. I think what you were trying to do was this:
this setpos [getpos game1 select 0, getpos game1 select 1, getpos game1 select 2]
What the "select" function does is it grabs only the element of the array that you tell it to, instead of the whole array.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

fragsta

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #6 on: 29 May 2003, 11:24:35 »
Well I understand completely what you are saying, but the one you suggested still doesn't work. Should I not use a game logic as the place where it goes?

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:TUNNEL! YES! I KNOW!
« Reply #7 on: 24 Jun 2003, 06:49:08 »
aaargh - 7 replies and not a hit yet  ::)

unitxx setpos [(getpos game1 select 0),(getpos game1 select 1),(getpos game1 select 2)]

Or:

unitxx setpos [(getpos game1 select 0),(getpos game1 select 1)]

Or:

unitxx setpos (getpos game1)

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

eko

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #8 on: 24 Jun 2003, 20:12:38 »
the example he gave worked fine for me

IlikeOFP

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #9 on: 30 Jun 2003, 21:21:03 »
I beleive a game logic is the best way to start.  You could do what someone else said about the black in black out thing.  Such as having a cutscene after you click the action. For Example:

have like it black in for a couple of seconds and have a titletext saying "man its dark in here" or "I can't see at all" something like that then setpos to your game logic and then have it black out and your there.

Hopefully this works I'm new at cutscenes though so I'm not sure but its worth a try I guess, have fun and good luck.

 :thumbsup:

Cpl. Vagabond

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #10 on: 21 Aug 2003, 00:54:11 »
If someone could contact me regarding this the Starship Troopers mod would really like tunnels, i mean you can't just fight bugs above ground

fragsta

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #11 on: 23 Aug 2003, 14:57:58 »
aaargh - 7 replies and not a hit yet  ::)

unitxx setpos [(getpos game1 select 0),(getpos game1 select 1),(getpos game1 select 2)]

Or:

unitxx setpos [(getpos game1 select 0),(getpos game1 select 1)]

Or:

unitxx setpos (getpos game1)

~S~ CD

Ok, after months, it finally works, with one flaw. The person going into the tunnel must be called "unitxx" or whatever it is that is required. Is it possible to allow anyone to use it? Such as an AI with no name?

Offline KTottE

  • Former Staff
  • ****
Re:TUNNEL! YES! I KNOW!
« Reply #12 on: 23 Aug 2003, 15:06:23 »
I would add an action to the tunnel to get in, like so:
Place the tunnel object, name it something.

init.sqs:
Code: [Select]
tunnelname addAction ["Enter tunnel","enterscript.sqs"]

enterscript.sqs:
Code: [Select]
_man = _this select 1
_man setPos (getPos logicname)

That will relocate anyone who uses the action to the position of the game logic with the name logicname.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"

fragsta

  • Guest
Re:TUNNEL! YES! I KNOW!
« Reply #13 on: 23 Aug 2003, 16:24:09 »
Thanks, mate! This will do wonders for things!

Wait....one more thing...how do you make AI use the new action?
« Last Edit: 23 Aug 2003, 16:24:50 by fragsta »

Offline KTottE

  • Former Staff
  • ****
Re:TUNNEL! YES! I KNOW!
« Reply #14 on: 23 Aug 2003, 16:40:26 »
If they are close enough, they will be able to use it. I imagine it's a simple matter of doing:
SoldierName action["Actionname"], but I'm not sure it works with added actions.

try it.
"Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming 'WOW What a Ride!'"