Plasma Grenades!

Post » Fri Feb 18, 2011 6:07 pm

You may (probably not) remember a small thread announcing a WIP mod involvinghttp://www.gamesas.com/index.php?/topic/1155458-wip-request-zombies-in-spaceies? Well, it's still under way, with many more interesting things than last time, but the team has hit a bit of a snag that needs help. One of the things we intend to implement is a plasma grenade that a player can throw at zombies. We've got the model made (really just the ball from the crystal ball with a new texture) but a scipt is tricky.

We alreay have the spell we need the grenade to cast (AAATECHNOPLASMAGRENADESPELL) big AOE thing, but we need a script that does the folowing:

When the grenade is clicked, asks "Activate grenade?" "Yes": Grenade begins a five second timer, bonus if it's counted off in messages. "No": Grenade is returned to inventory.

Now, I dare say this is a tricky script, but I'd be grateful for any help. I've tried to look at the scripts on other grenade spell mods (midas, tripwires) but frankly I need this explained in dummy baby scripter talk.

Credit would be gladlt\y be offered.
User avatar
Mandy Muir
 
Posts: 3307
Joined: Wed Jan 24, 2007 4:38 pm

Post » Sat Feb 19, 2011 1:51 am

Phitt's http://tesnexus.com/downloads/file.php?id=32267 mod does something like that. Check it out and see if that's similar to what you want to do.
User avatar
John Moore
 
Posts: 3294
Joined: Sun Jun 10, 2007 8:18 am

Post » Sat Feb 19, 2011 4:36 am

"I've tried to look at the scripts on other grenade spell mods (midas, tripwires) but frankly I need this explained in dummy baby scripter talk."

I did say that.
User avatar
Rachel Hall
 
Posts: 3396
Joined: Thu Jun 22, 2006 3:41 pm

Post » Fri Feb 18, 2011 9:41 pm

"I've tried to look at the scripts on other grenade spell mods (midas, tripwires) but frankly I need this explained in dummy baby scripter talk."

I did say that.

:huh: I missed that part, sorry. :blush: I can understand your desire for a detailed explanation. I've looked through some of those myself and can't make heads or tails of them (especially the ones in Midas).
User avatar
JUDY FIGHTS
 
Posts: 3420
Joined: Fri Jun 23, 2006 4:25 am

Post » Sat Feb 19, 2011 1:24 am

I made the Assassins Tripwires mod. Not sure if that is the one you are referring to.
But, this would be an advanced topic in scripting, especially if you are unfamiliar with how to write code.

I am a scholar on the scripting forum on http://tesalliance.org/forums/index.php?/forum/15-scripting/ and I could 'help' you there, but I don't have the time to write it for you. I also have some classes you can take to help you learn about scripting.
User avatar
Alexxxxxx
 
Posts: 3417
Joined: Mon Jul 31, 2006 10:55 am

Post » Fri Feb 18, 2011 6:25 pm

@Vyper: Hey, no prob, man! Happens to everyone.

@Williesea: Oh, eh... okay, then. No sweat. I guess I won't trouble you for 'help.'
User avatar
Kara Payne
 
Posts: 3415
Joined: Thu Oct 26, 2006 12:47 am

Post » Fri Feb 18, 2011 9:02 pm

ScriptName ZCDMTestItemScriptShort PartShort ButtonRef TargetShort TimerBegin OnActivate	Set Part to 1EndBegin GameMode	If ( Part == 1 )		MessageBox" What would you like to do with this grenade?", "Activate It", "Pick It Up"		Set Part to 2	ElseIf ( Part == 2 )		Set Button to ( GetButtonPressed + 1 )		If ( Button == 1 )			Set Part to 3		ElseIf ( Button == 2 )			Activate			Set Part to 0			Set Timer to 0		EndIf	ElseIf ( Part == 3 )		MessageBox" How long would you like to set the timer?", "20 Seconds", "10 Seconds", "5 Seconds", "Cancel"		Set Part to 4	ElseIf ( Part == 4 )		Set Button to ( GetButtonPressed + 1 )		If ( Button == 1 )			Set Timer to 400			Set Part to 5		ElseIf ( Button == 2 )			Set Timer to 200			Set Part to 5		ElseIf ( Button == 3 )			Set Timer to 100			Set Part to 5		ElseIf ( Button == 4 )			Set Part to 0		EndIf	ElseIf ( Part == 5 )		MessageBox" Grenade Armed. Evacuate The Area!"		ZCDMTestTargetMarker2.MoveTo Player		 ;<--- ZCDMTestTargetMarker2 is an Rat in a Remote Cell, Initially Disabled		ZCDMTestCastMarker.MoveTo Player			 ;<--- ZCDMTestCastMarker is an X Marker, in a Remote Cell		Set Part to 0	EndIf	If ( Timer >= 1 )		Set Timer to ( Timer - 1 )	EndIf	If ( Timer == 1 )		ZCDMTestTargetMarker2.Enable		ZCDMTestCastMarker.Cast ZCDMTestSpell ZCDMTestTargetMarker2	 ;<--- ZCDMTestSpell is the Spell to be Cast		ZCDMTestTargetMarker2.Disable		Disable	EndIf	;--------Start Of Suction-------	If ( Timer == 5 )		ZCDMTestTargetMarker2.Enable		ZCDMTestCastMarker.Cast ZCDMTestSpell02	 ZCDMTestTargetMarker2;<--- ZCDMTestSpell is the Spell to be Cast		ZCDMTestTargetMarker2.Disable	EndIf	;--------End Of Suction-------	If ( Timer == 20 )		Message" 1 Second..."	EndIf	If ( Timer == 40 )		Message" 2 Seconds..."	EndIf	If ( Timer == 60 )		Message" 3 Seconds..."	EndIf	If ( Timer == 80 )		Message" 4 Seconds..."	EndIf	If ( Timer == 100 )		Message" 5 Seconds..."	EndIfEnd


Should Work now :)

I also threw in this:
ScriptName ZCDMTestSuctionScriptRef Target1Begin ScriptEffectStart	Set Target1 to GetSelf	ZCDMTestTargetMarker2.PushActorAway Target1 -50End

It's hooked to a separate Spell (Note the marked Section), and causes people nearby to be svcked in, jsut before the explosion.

Note that this works more like a dropped-bomb/landmine, than an outright grenade; the Cleanup is also a little messy, but as a starting point should help.
User avatar
Emma-Jane Merrin
 
Posts: 3477
Joined: Fri Aug 08, 2008 1:52 am


Return to IV - Oblivion