Quick Questions -- Quick Answers, The Thirteenth

Post » Fri May 27, 2011 1:47 am

I need a little help for switching to 3rd person and back. I have it switching to third person well but I'm having trouble getting it to go back to first person. I tried a timer but it didn't work, it randomly switched even if the character didn't have the weapon. If anyone has any idea I'd be very thankful.

scn UGPPistolHealthDamageScriptfloat bulletspeedfloat originalspeedbegin onequip playerset bulletspeed to (4 * getmagiceffectprojectilespeed DGHE)setmagiceffectprojectilespeed bulletspeed DGHEsetmagiceffectcastingsound UGPPistolFire DGHEset UGPPistolEquiped to 1endbegin gamemodeif UGPPistolEquiped == 1 && iscontrolpressed 4 == 1 && isthirdperson == 0 && player.isweaponout == 1tapcontrol 14endifendbegin onunequip playerset originalspeed to (4 / getmagiceffectprojectilespeed DGHE)setmagiceffectprojectilespeed originalspeed DGHEsetmagiceffectcastingsound SPLDestructionCast DGHEset UGPPistolEquiped to 0end

User avatar
Eduardo Rosas
 
Posts: 3381
Joined: Thu Oct 18, 2007 3:15 pm

Post » Fri May 27, 2011 8:02 am

Ok, got all my stuff working on my own. Only having a problem with a spell script right now. The spell is a Ressurect spell on the target, with an area effect since my trap is firing above the dead npc. Only problem is, the Ressurect 1 command causes a CTD if it hits the player. So I tried scripting the spell so that it doesn't effect the player.

It was working at first, then I noticed it was having another effect on me. It was resurrecting the npc, but it was also unequipping my bow and arrows. They didn't show as unequipped in my inventory, but they were. Then when testing again the spell caused me to CTD again. Here's the script, any ideas?

SCN TestRessurectSpell	ref targetref meBegin ScriptEffectStart	set me to GetSelf	if target == me		return	else		Resurrect 1	endifEnd

User avatar
Julie Ann
 
Posts: 3383
Joined: Thu Aug 23, 2007 5:17 am

Post » Thu May 26, 2011 10:03 pm

Ok, got all my stuff working on my own. Only having a problem with a spell script right now. The spell is a Ressurect spell on the target, with an area effect since my trap is firing above the dead npc. Only problem is, the Ressurect 1 command causes a CTD if it hits the player. So I tried scripting the spell so that it doesn't effect the player.

It was working at first, then I noticed it was having another effect on me. It was resurrecting the npc, but it was also unequipping my bow and arrows. They didn't show as unequipped in my inventory, but they were. Then when testing again the spell caused me to CTD again. Here's the script, any ideas?

SCN TestRessurectSpell	ref targetref meBegin ScriptEffectStart	set me to GetSelf	if target == me		return	else		Resurrect 1	endifEnd


You should add getdead in there somewhere. It crashes if resurrect is run on a living character.
User avatar
Erin S
 
Posts: 3416
Joined: Sat Jul 29, 2006 2:06 pm

Post » Fri May 27, 2011 9:30 am

See, I knew there was a very simple solution, I just wasn't sure what it was >.< Thanks, I'll test it out when I get home later.
User avatar
Emmi Coolahan
 
Posts: 3335
Joined: Wed Jan 24, 2007 9:14 pm

Post » Fri May 27, 2011 5:28 am

http://www.gamesas.com/bgsforums/index.php?showtopic=1020604
User avatar
Laura-Jayne Lee
 
Posts: 3474
Joined: Sun Jul 02, 2006 4:35 pm

Previous

Return to IV - Oblivion