Home   Help Search Login Register  

Author Topic: Positioning  (Read 1452 times)

0 Members and 1 Guest are viewing this topic.

shadow99

  • Guest
Positioning
« on: 13 Nov 2004, 12:27:57 »
Hello. I'm having a minor problem with the 'setPos' command, if that's what I'm supposed to be dealing with for my problem. You see, I want to instantly move my player to another position (and facing a certain direction, I may add) when and in-game cutscene takes place, much like on the very first level of the Resistance Campaign.

Could someone pelase tell me how this is done? I looked through the tutes and I couldn't really find anything.

Thank you!

Offline Mud_Spike

  • Contributing Member
  • **
Re:Positioning
« Reply #1 on: 13 Nov 2004, 13:43:04 »
Code: [Select]
player SetPos somePosArray
player SetDir someDir

I.e., to have the player be positioned at a marker named "mrk_town"
and facing east, do something like:
Code: [Select]
player SetPos GetMarkerPos "mrk_town"
player SetDir 90

shadow99

  • Guest
Re:Positioning
« Reply #2 on: 13 Nov 2004, 13:45:22 »
Just what I was looking for! Thanks heaps Mud_Spike.

shadow99

  • Guest
Re:Positioning
« Reply #3 on: 13 Nov 2004, 13:50:13 »
Odd. My player dies upon issuing this command...

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Positioning
« Reply #4 on: 13 Nov 2004, 15:38:02 »
try using getpos with a GL instead of a marker.

loon1 setpos getpos GL1
loon1 setdir 90

:beat: *Gets Shot* :beat:

shadow99

  • Guest
Re:Positioning
« Reply #5 on: 14 Nov 2004, 01:27:55 »
Still dies, I'm afraid. The mission is at night, and when the cutscene activates it appears the camera focuses on some water somewhere, then blacks in to the cutscene, then quickly blacks out to the death scene. It's underwater somewhere.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Positioning
« Reply #6 on: 14 Nov 2004, 02:02:41 »
Odd. I just tried it, and in a trigger i put:
player setpos getpos gl; player setdir 90
and i ran through the trigger and was sent off to the game logic facing a new direction
It worked fine for me... ???

perhaps if you were to post your script so we can have a look at it?
« Last Edit: 14 Nov 2004, 02:03:49 by Triggerhappy »

shadow99

  • Guest
Re:Positioning
« Reply #7 on: 14 Nov 2004, 02:47:39 »
Sure thing:


Code: [Select]
setAccTime 1
player1 removeWeapon "nvgoggles"
player1 SetPos GetMarkerPos GL2
player1 SetDir 265
titlecut [" ","BLACK IN",3]
enableradio false
fire1 inflame true
_cam = "camera" camcreate [0,0,0]
_cam cameraeffect ["internal", "back"]
_cam camsettarget player1
_cam camsetrelpos [0,10,4]
_cam camcommit 0
@camcommitted _cam
playMusic "track3"
player1 playMove "EffectStand"
~3

"GL2" is a game logic where I want the player to be.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:Positioning
« Reply #8 on: 14 Nov 2004, 02:59:38 »
Try:

player1 setPos getPos GL2

instead of:

player1 setPos getMarkerPos GL2


Planck
I know a little about a lot, and a lot about a little.

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Positioning
« Reply #9 on: 14 Nov 2004, 03:10:27 »
the camera focuses on some water somewhere
is your game logic close to water?
it may actually be sumberged enough to kill the person
...maybe...

shadow99

  • Guest
Re:Positioning
« Reply #10 on: 14 Nov 2004, 06:28:40 »
Thanks Plank, your method worked. Thanks for the help TriggerHappy, I guess the 'getPos' is completely necessary.

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Positioning
« Reply #11 on: 14 Nov 2004, 10:20:19 »
That was what I said before lol. :P

The reason it didn't work before is because the marker have to be in quotations. Like:

player1 setPos getMarkerPos "GL2"

:beat: *Gets Shot* :beat:

Offline KTottE

  • Former Staff
  • ****
Re:Positioning
« Reply #12 on: 14 Nov 2004, 10:34:10 »
And it has to be a marker...
"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!'"

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Positioning
« Reply #13 on: 14 Nov 2004, 10:43:43 »
Hehe. ::)

:beat: *Gets Shot* :beat: