Setting A Conditional On A Trigger

Post » Thu Jun 21, 2012 11:17 am

declare the doors as objref properties and fill them in the properties window

then in the fragment

Door1Ref.Enable()
Door2Ref.Enable()

the names Door1Ref etc are the names of the properties you declare, you can name these whatever

Do you mean as a new alias in the quest?

Or within the trigger that ends the 1st quest?
User avatar
Ysabelle
 
Posts: 3413
Joined: Sat Jul 08, 2006 5:58 pm

Post » Thu Jun 21, 2012 6:55 pm

in the fragment itself. declare a property the same way you would any other script (except because of a bug, you may have to type a ; then compile and close out then reopen, before you can add properties)
User avatar
Harry-James Payne
 
Posts: 3464
Joined: Wed May 09, 2007 6:58 am

Post » Thu Jun 21, 2012 12:43 pm

in the fragment itself. declare a property the same way you would any other script (except because of a bug, you may have to type a ; then compile and close out then reopen, before you can add properties)

Ok, thanks!

I'll play around with it now.

I appreciate all the help!
User avatar
Krista Belle Davis
 
Posts: 3405
Joined: Tue Aug 22, 2006 3:00 am

Post » Thu Jun 21, 2012 7:32 pm

To be more clear about the syntax, you can name the variables for events whatever you like. For example, the example in the wiki for OnHit:

Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)

You could just as easily use:

Event OnHit(ObjectReference WhoHitMe, Form WhatHitMe, Projectile RangedAttackItem, bool IGotHitHard, bool DamnSneakyBastards, bool IFeelWoozy, bool LOLNoob)

Just make sure that the code that you write inside uses the new variable names. Basically, when it gets hit it knows to expect:
  • ObjectReference for whoever did the attack
  • Form for what the object reference used for the attack
  • Projectile used in the attack, if any
  • Bool determining whether or not it was a power attack
  • Bool determining whether or not it was a sneak attack
  • Bool determining whether or not it was a bash attack
  • Bool determining whether or not it was a blocked attack
Then the script will automatically assign the data to the variables that you named.

Variable names do matter when you call a function though. For example, this works:

MoveTo(Game.GetPlayer(), afZOffset = 100.0)

and this doesn't:

MoveTo(Game.GetPlayer(), ZUnitsFromTarget = 100.0)
User avatar
Wayland Neace
 
Posts: 3430
Joined: Sat Aug 11, 2007 9:01 am

Post » Thu Jun 21, 2012 3:46 pm

@noob

I understand. I was think all this time that akStuff were reserved

That last line you showed:

MoveTo(Game.GetPlayer(), afZOffset = 100.0)

Would that force an NPC to 100 units in front of a player?

It's a question I was going to post next up regarding the quest to have an NPC tell the player that they are not welcome in town....yet.

edit

oh yea....I decided to put the script to enable the load door in the trigger box that ends the 1st quest, which is right in front of the door. I also added a collision box that is disabled in the script because I had predators who were going in to where the load door is and not attacking the player until he gets too close to the load door.
User avatar
NAkeshIa BENNETT
 
Posts: 3519
Joined: Fri Jun 16, 2006 12:23 pm

Post » Thu Jun 21, 2012 11:11 am

MoveTo(Game.GetPlayer(), afZOffset = 100.0)

Would that force an NPC to 100 units in front of a player?

It's a question I was going to post next up regarding the quest to have an NPC tell the player that they are not welcome in town....yet.

That line would actually pop the object/npc 100 units above the player. The third example on the http://www.creationkit.com/MoveTo_-_ObjectReference has the trig formula needed to place something in front of the player.
User avatar
Josh Trembly
 
Posts: 3381
Joined: Fri Nov 02, 2007 9:25 am

Post » Thu Jun 21, 2012 5:16 pm

That line would actually pop the object/npc 100 units above the player. The third example on the http://www.creationkit.com/MoveTo_-_ObjectReference has the trig formula needed to place something in front of the player.

I went to the page about that and found ForceGreet.

I've been playing around with it but it doesn't do anything but make the NPC run up to the player (with the option to run always ticked), and then he runs around following you.

It seems like every step of the way I do a hundred rounds of trial and error and up right back here as a beggar for answers :/
User avatar
Sammykins
 
Posts: 3330
Joined: Fri Jun 23, 2006 10:48 am

Post » Thu Jun 21, 2012 4:05 am

Maybe your ForceGreet radius is too small?
User avatar
Nathan Maughan
 
Posts: 3405
Joined: Sun Jun 10, 2007 11:24 pm

Post » Thu Jun 21, 2012 8:20 pm

LBGQuest01_LBGQuest01NoEnt_000239D1_1
Maybe your ForceGreet radius is too small?

I seem to have most everything set ok now.

But there are still a few problems so I started a new thread regarding those: http://www.gamesas.com/topic/1375526-using-forcegreet/
User avatar
Gracie Dugdale
 
Posts: 3397
Joined: Wed Jun 14, 2006 11:02 pm

Previous

Return to V - Skyrim