Canderis Posted August 5, 2009 Posted August 5, 2009 How would I make a beam come out of a placable, and zap a spot and then a npc spawns there.
Star Admiral Posted August 5, 2009 Posted August 5, 2009 Try this. I'm not positive it will work, as EffectBeam() seems only to work with creatures. void main() { location lSpawn = Location( Vector( 0.0, 0.0, 0.0 ), 0.0 ); object oPlaceable = GetObjectByTag( "TagOfPlaceable" ); effect eBeam = EffectBeam( 1021, oPlaceable, BODY_NODE_CHEST, FALSE ); object oZap = CreateObject( OBJECT_TYPE_PLACEABLE, "plc_invisible", lSpawn, FALSE ); ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eBeam, oZap, 1.5 ); AssignCommand( oZap, DestroyObject( oZap, 2.0, TRUE, 0.0 ) ); CreateObject( OBJECT_TYPE_CREATURE, "TagOfCreature", lSpawn, TRUE ); } - Star Admiral
Canderis Posted August 5, 2009 Author Posted August 5, 2009 void main() { location lSpawn = Location( Vector( 2.68, -126.97, 28.60 ), 3.14 ); object oPlaceable = GetObjectByTag( "PLC_holocron" ); effect eBeam = EffectBeam( 1021, oPlaceable, BODY_NODE_CHEST, FALSE ); object oZap = CreateObject( OBJECT_TYPE_PLACEABLE, "plc_invisible", lSpawn, FALSE ); ApplyEffectToObject( DURATION_TYPE_TEMPORARY, eBeam, oZap, 1.5 ); AssignCommand( oZap, DestroyObject( oZap, 2.0, TRUE, 0.0 ) ); CreateObject( OBJECT_TYPE_CREATURE, "dt", lSpawn, TRUE ); } Doesn't work. I can fire it through dialog if needed. EDIT: I got it to work, minus the beam, it looks fine for what I am doing so no further questions here.
Star Admiral Posted August 6, 2009 Posted August 6, 2009 Could you tell me what you edited to make it work? I'm curious. - Star Admiral
Canderis Posted August 6, 2009 Author Posted August 6, 2009 I just removed the beam effect. Just kept the spawn.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.