Jump to content

Home

Beam/spawn script


Canderis

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...