Best way to go about this trap

Post » Thu Feb 17, 2011 3:19 am

Im making a small mod atm, and 1 part of the micro quest involves picking up a trap weapon that teleports the player to the cell with the actual weapon and a few monsters.
Now, I have got the picking up, teleporting to new cell, removing trap weapon from player all fine if I don't add a spell (ability) that paralyses them, to the script if I add it before the "movetomarker" line then I get this weird warping of the players model in the new cell (like there legs are on 1 side of the cave there head is on the other side and the centre torso is with the 1st person camera floating around...) and if I put the spell after the line it fails to work....

what would be the best way to correct this and have the player teleport to the new cell and then be paralysed?
im not sure what local script I will need to make in the new cell to have the player paralyse as soon as they arrive in it.

any ideas?

Thanx
User avatar
Alina loves Alexandra
 
Posts: 3456
Joined: Mon Jan 01, 2007 7:55 pm

Post » Wed Feb 16, 2011 11:33 am

Im making a small mod atm, and 1 part of the micro quest involves picking up a trap weapon that teleports the player to the cell with the actual weapon and a few monsters.
Now, I have got the picking up, teleporting to new cell, removing trap weapon from player all fine if I don't add a spell (ability) that paralyses them, to the script if I add it before the "movetomarker" line then I get this weird warping of the players model in the new cell (like there legs are on 1 side of the cave there head is on the other side and the centre torso is with the 1st person camera floating around...) and if I put the spell after the line it fails to work....

what would be the best way to correct this and have the player teleport to the new cell and then be paralysed?
im not sure what local script I will need to make in the new cell to have the player paralyse as soon as they arrive in it.

any ideas?

Thanx

Could you give more details? Do you mean that when the player picks the weapon up, he/she teleports to a X-marker, where the weapon is lying down on the floor? Or do you want the fake one being removed from inventory and the "real" one being added? And the best way for the paralysis is to script it as a whole (player.setav paralysis 1 -use with timer if you want it to last for a certain amount of time)

Here is an example (used in the trap weapn). Note that I am not sure about how this will work, as I am not an experienced scripter and I pulled that one straight out from my silly magical hat.



Begin OnAddfloat timer   player.setav paralysis 1   player.moveto *where you want the player to teleport*   player.removeItem *fake weapon's ID* 1   player.addItem *real weapon's ID* 1   player.equipItem *real weapon's ID*   if ( timer < 5 )          set timer to timer + getSecondsPassed      else                                                                          player.setav paralysis 0   endifend

User avatar
Stephy Beck
 
Posts: 3492
Joined: Mon Apr 16, 2007 12:33 pm

Post » Thu Feb 17, 2011 12:31 am

Im making a small mod atm, and 1 part of the micro quest involves picking up a trap weapon that teleports the player to the cell with the actual weapon and a few monsters.
Now, I have got the picking up, teleporting to new cell, removing trap weapon from player all fine if I don't add a spell (ability) that paralyses them, to the script if I add it before the "movetomarker" line then I get this weird warping of the players model in the new cell (like there legs are on 1 side of the cave there head is on the other side and the centre torso is with the 1st person camera floating around...) and if I put the spell after the line it fails to work....

what would be the best way to correct this and have the player teleport to the new cell and then be paralysed?
im not sure what local script I will need to make in the new cell to have the player paralyse as soon as they arrive in it.

any ideas?

Thanx


Part of the problem is that MoveTo acts as a return when used on the Player, so no following lines will run. What you could do is add a scripted token to the Player just before the MoveTo command. Give the token a timer that will wait 2-3 seconds then paralyze the Player for however long you want.
User avatar
Kelsey Hall
 
Posts: 3355
Joined: Sat Dec 16, 2006 8:10 pm

Post » Wed Feb 16, 2011 5:52 pm

OK, thanks for the reply 1st off. it goes like this.

the player finds out the location of the weapon is at such & such a place (a cave) It has a few default goblins in it... at the end of the cave is the proposed weapon (actually the trap weapon),
the player thinks "that was rather easy" and picks up the weapon (the trap).
by picking up the trap weapon they are teleported to another interior cell (made just for this mod) and the trap weapon is removed from there inventory (as it looks like the real 1 and has a price tag of $4000, I don't want it being used a bonus selling item, and it's the only way into the new interior cell).
in this new interior cell is a few monsters and a rather hard skeleton warrior wielding the real weapon (so the player must beat the "boss" to get the real weapon, and the key to get out).
1 part of the trap is that the player is paralysed as they enter the new interior cell in full view of the monsters. (the point is to sort of have that player thinking "mission accomplished" right before being placed in a deadly situation and already at the disadvantage of being paralysed)
after the skeleton boss is dead the player can get the key and the real weapon and use the door out to another part of the world.
after it's all accomplished there is no way back into the new interior cell as the trap weapon is gone. (I might load it up with some heavy treasures, so the player can only select what they can carry to leave with)

I'll be putting some paralyses cure in the cave with the trap weapon so there is a chance if the player dose not already have any.

my very simple "current" script below dose everything but the paralysing part, I think I can work in some of Sami_'s script and make it work but that's the basic mod.
this little script dose the job if I don't want it to Paralyse the player. I was toying around with the line;
player.addspell "paralyse spell ability"
but I came up with the warping issues stated.


Begin OnAdd Player	player.RemoveItem "trap weapon ID" 1	player.MoveToMarker "new interior cell marker ID"End

User avatar
Flash
 
Posts: 3541
Joined: Fri Oct 13, 2006 3:24 pm

Post » Wed Feb 16, 2011 6:02 pm

ok, so I just tried a new version of the script and I still get the same warping issue http://i966.photobucket.com/albums/ae150/Carnage009/Digital%20Dexterity/Others/WTFteleport.jpg... this only corrects after the paralysis has worn off/been cured.
It seems that if the player is paralysed by any means, and then they are transported to a new location, this warping happens...

so what I need to do it seems, is have a second script in the new interior cell that will paralyse the player the 1st (and only) time they enter it the cell.



so I make an object outside the playable area and assign a script to it that will use the "setav paralysis 1" line to paralyse the player as they enter (or a second after)... now it's a bit beyond me...
User avatar
Anne marie
 
Posts: 3454
Joined: Tue Jul 11, 2006 1:05 pm

Post » Thu Feb 17, 2011 2:38 am

ok, so I just tried a new version of the script and I still get the same warping issue http://i966.photobucket.com/albums/ae150/Carnage009/Digital%20Dexterity/Others/WTFteleport.jpg... this only corrects after the paralysis has worn off/been cured.
It seems that if the player is paralysed by any means, and then they are transported to a new location, this warping happens...

so what I need to do it seems, is have a second script in the new interior cell that will paralyse the player the 1st (and only) time they enter it the cell.



so I make an object outside the playable area and assign a script to it that will use the "setav paralysis 1" line to paralyse the player as they enter (or a second after)... now it's a bit beyond me...


To avoid that distortion, you'll probably need to paralyze the Player from a separate script after being moved into the new cell.

Try this method:
Place an activator in the new cell and give it a unique RefID. Try using ActivatorFlameNode0 (it's very small and hard to see).
Set up a Trigger Zone around the teleport marker and script it to cause the activator to cast a paralysis spell on the Player (one time only). The Trigger Zone script should look something like:

scn ParalyzeTrigZoneScriptshort doonceBegin OnTrigger PlayerIf doonce == 0  ActivatorRefID.Cast ParalysisSpellID Player  Set doonce to 1Endifend


Note: when using MoveTo to move the Player into this cell, use Player.MoveTo MarkerRef 0, 0, 10. This will cause the Player to fall 10 units when moved into the cell and ensure that the Trigger Zone is properly triggered.
User avatar
lauraa
 
Posts: 3362
Joined: Tue Aug 22, 2006 2:20 pm

Post » Wed Feb 16, 2011 8:14 pm

...http://i966.photobucket.com/albums/ae150/Carnage009/Digital%20Dexterity/Others/WTFteleport.jpg...

I'm not going to pretend that that isn't worth lolling at. The picture I mean. The phenomen on the other hand is very serious indeed.
User avatar
YO MAma
 
Posts: 3321
Joined: Thu Dec 21, 2006 8:24 am


Return to IV - Oblivion