nicked on 19/3/2008 at 09:47
I want to have a setup where the player frobs a button and an object is teleported directly to the player's location. I've tried a number of things but nothing seems to work.
I tried adding TrapTeleporter to the StartingPoint, and ControlDevice linking it to the object. This works, but the object always appears at the starting point, not the current player location.
Then I tried adding TrapTeleporter to the Garrett archetype, adding a ControlDevice link from Garrett to the object, and triggering it. Nothing at all happens this time.
My added problem is I have two seperate occurences of objects teleporting to the player's location which can be triggered independently of each other. So when I was trying the second option above, I set up two conversations which add metaproperties to Garrett containing a link from the metaproperty to the object I want teleporting, and remove the other metaproperty, so the objects can never be teleported at the same time. Not sure if this would even work, but since the more basic setup didn't, I am unable to check.
So I basically want a system where:
1. Player frobs button 1 (for instance)
2. Object 1 is teleported to player's current location.
3. Player frobs button 2
4. Object 2 is teleported to player's current location.
All I can think now is perhaps to have Garrett emit the object, but this will surely create a new instance of the object, and I need to be able to set up other interactions between the objects that can't rely on linking to the archetype. Perhaps Garrett could emit a teleport trap...
Fidcal on 19/3/2008 at 10:02
Maybe try physAttach something to the Garrett archetype and give that TrapTeleporter? Probably take a marker, give it some physics so it will physAttach, leave unrendered etc. Possibly just take a normal TrapTeleporter and give it some physics. It probably needs to be inside Garrett. If it is offset then the teleported item might materialize in solid if Garrett is close to a wall.
nicked on 19/3/2008 at 10:07
how do I physattach something to Garrett? Do I have to add the link ingame. I tried setting up a link between Garrett archetype and an object - at best the object stays put, at worst the game crashes...
Fidcal on 19/3/2008 at 10:23
I was afraid you'd ask that! I tried it some years ago but it wasn't quite what I wanted in my case. I'll see if I can find the info I had. Someone here will know - and try a search too as it might reveal something.
Fidcal on 19/3/2008 at 10:25
OK, here's some old notes I made but I've not re-read it yet...
Fidcal
Can I attach an object to the Player?
How can I attach an object to the player? I've done a search but it didn't help and the threads just confused me more as one seemed to indicate it is easy but didn't say precisely how and another concentrated on rendering it at a fixed screen position. I'm not bothered about its position or orientation.
I've tried a creatureAttachment link to 'Garrett' and 'garrett'. And the same to 'player' and 'Player'. Then I tried adding the link to the player in-game via a conversation. Nothing seems to work.
Mortal Monkey Go into gamemode with set_game_backup 0, then go back out immediately. You should then have a player object you can modify. The problem is that it might break your mission, so save under a different name and test thoroughly afterwards.
There are probably other ways to accomplish the intended effect though.
Fidcal Hmmm... Can't see it anywhere. Where should it be? In the game at the start point or do you mean in the hierarchy list somewhere?
Aahhh... quick search reveals its... set game_mode_backup 0
Yes, that gives me a player object. I'll fool around with later but hopefully someone will come up with a less risky method!
sluggs A less risky method? Yup.
I have been messing with the player object for the past couple of hours experimenting with settings.
When you have your player object, from entering that command, save it with a marker as a multibrush and then load that into your normal level and you can mess with that.
It works! You can attach particles to it or a light source and they follow the player around! WOOT! You can even PhysAttach it to a vator for a CamVator.
Yandros Sluggs, you're a genius.
sluggs Yeah - I know's it!
You know, where ever you place this object, you start at that point, just like adding the Startpoint. Even if you have a Startpoint, you will start where the "Player" object is. I reckon, if you have the "Player" object in yourmission, you don't even need a startpoint as you can just add the VictoryCheck script to that. Also, any items that are linked to the Startpoint via "Contains", as in Garrett's weapons, won't be available with the Player object so you have to link them to that instead.
I love experimenting with Dromed.
Fidcal Sluggs: I can only say Wow. This goes beyond what I was thinking. I'll do some more experimenting. Thanks.
nicked on 19/3/2008 at 10:43
hmm, ok I will give this a try tonight and see what I can come up with. Being able to modify the actual player object would definitely make life easier! Thanks!
Yandros on 19/3/2008 at 11:38
I think you can teleport to the player simply using a receptron action... but Ive never tried it.
Zontik on 19/3/2008 at 13:21
I used thing I called "Magnetic marker" in the "Eternal Candle" FM. The idea is that in certain moment player "picks up" marker which teleports to it's new location (while player moves) every 5 milliseconds. I used this marker to return player to it's unpredictable location after camvator sequence. That's the way to know players coordinates to use them as you wish - even in the conversation you may force the actors to turn to the player (as it seems, really - to the marker).
The technical side of this trick is not too hard to understand. I create custom stim. Then I added receptron for this stim to the player archetype to stimulate "source object" with the same stim (as Spike wrote in his tutorial). And after all I create marker with Source to stimulate player. Player recieves signal and stimulate marker in return. Marker recieves signal and teleports itself to the player's location (receprton on the marker: custom stim - teleport object - Me - to the Source object). The source of the marker defines how often this marker will search for the player and teleport to him.
Player and marker exchange with the signals like modems do, then they connect.
Ufff... it was much simple to do than to explain.
Now when the player enters in marker's stim radius, he "catches" the marker.
Yandros on 19/3/2008 at 16:20
Quote Posted by Zontik
I used this marker to return player to it's unpredictable location after camvator sequence.
To avoid having to deal with this in missions like
Mask of Agamemnon, I just used Telliamed's
TrapFreezePlayer to prevent them from moving during the cutscene. In that case, the camera was shifted to a
TrapCamAttach which was somewhere other than the player's location, so it was more or less a requirement to freeze the player (else, the player could have moved around without seeing where they were going).
Shadowspawn on 19/3/2008 at 17:43
In "Lord Fishkill's Curse", I emitted AI right in front of Garrett. I had to use sources and receptrons to make them appear some distance in front of him, but I think with an object, it would be simply an offset.
You could hook up an emitter trap to the player, and just have it connected via a CD link to some kind of trigger, like a button.
This assumes it's not some unique object that has to exist during the mission, previous to the player having it teleport to him. If you can just create it on the fly, an emitter trap is pretty easy.