There are currently 0 users online.
from bw templates\dev\test.gas [dev,t:template,n:dev_sword_whip] { specializes = base_sword_template; doc = "[TEST OBJECT] dev_sword_whip";
[dev,t:template,n:dev_sword_whip] { specializes = base_sword_template; doc = "[TEST OBJECT] dev_sword_whip";
[aspect] { model = m_w_dag_003; } [attack] { attack_range = 0.5; damage_max = 4; damage_min = 2; } [common] { is_pcontent_allowed = false; screen_name = "Knife Whip"; } [gui] { inventory_height = 2; inventory_icon = b_gui_ig_i_w_dgr_007; inventory_width = 1; } [test_effect_playground] { effect = "whip_test"; target_hero = true; } } [dev,t:template,n:dev_sword_whip2] { specializes = base_sword_template; doc = "[TEST OBJECT] dev_sword_whip";
[aspect] { model = m_w_dag_003; } [attack] { attack_range = 0.5; damage_max = 4; damage_min = 2; } [common] { is_pcontent_allowed = false; screen_name = "Knife Whip"; } [gui] { inventory_height = 2; inventory_icon = b_gui_ig_i_w_dgr_007; inventory_width = 1; } [test_effect_playground] { effect = "whip_test2"; target_hero = true; watch_hero = true; } }
from bw global\effects\efct_test.gas [whip_test] { skrit=[[ property Goid target$ doc = "Target to run the effect on.";
[whip_test] { skrit=[[ property Goid target$ doc = "Target to run the effect on.";
startup state StartUp$ { event OnEnterState$ { int SiegeTarget$ = WorldFXMgr.CreateTarget(); int effect$ = WorldFXMgr.CreateRibbonEffect(SiegeTarget$, 0, RA_CAMERA_XAXIS); WorldFXMgr.SetTargetDependence( effect$, false, false ); WorldFXMgr.SetEffectTexture( effect$, "b_sfx_band4" ); WorldFXMgr.SetQuadRendering( effect$, true ); WorldFXMgr.AttachSimulation( effect$, "SpawnParticles( 200, 0xFFFFFFAA, 0xFFFFFFAA, .1, .1)", 0.0 ); WorldFXMgr.AttachSimulation( effect$, "PositionAtTarget()", 0.0 ); WorldFXMgr.AttachSimulation( effect$, "AccelAlongTargetVector( 0.0, 0.0, 1.0, 20, 20 )", 0.0 ); WorldFXMgr.AttachSimulation( effect$, "MoveWithVelocity()", 0.0 ); WorldFXMgr.AttachSimulation( effect$, "ScaleChange( 0.05, 0.07, 0.0, 0.0 )", 0.0 ); WorldFXMgr.SetEffectSrcBlend( effect$, PB_SRCALPHA ); WorldFXMgr.SetEffectDestBlend( effect$, PB_DESTALPHA ); WorldFXMgr.AttachTargetToGo( SiegeTarget$, target$, "weapon_grip" ); } } ]]; }
[whip_test2] { skrit=[[ property Goid target$ doc = "Target to run the effect on.";
int rib1$; int rib2$; int create_rib$( eRibbonAlign axis$ ) { // $$$ Fix createribboneffect - eli int SiegeTarget$ = WorldFXMgr.CreateTarget(); int effect$ = WorldFXMgr.CreateRibbonEffect( SiegeTarget$, 0, axis$ ); //effect$ = WorldFXMgr.CreateParticleEffect(); WorldFXMgr.SetTargetDependence( effect$, false, false ); WorldFXMgr.SetEffectTexture( effect$, "b_sfx_band4" ); //WorldFXMgr.SetEffectTexture( effect$, "b_sfx_sparkle01" ); WorldFXMgr.SetQuadRendering( effect$, true ); WorldFXMgr.AttachSimulation( effect$, "SpawnParticles( 300, 0xFF0000FF, 0xFF0000FF, .1, .1)", 0.0 ); //WorldFXMgr.AttachSimulation( effect$, "SpawnParticles( 3000, 0xFF000022, 0xFF000022, .25, .25)", 0.0 ); WorldFXMgr.AttachSimulation( effect$, "PositionAtTarget()", 0.0 ); WorldFXMgr.AttachSimulation( effect$, "AccelAlongTargetVector( 0.0, 0.0, 1.0, 16, 16 )", 0.0 ); WorldFXMgr.AttachSimulation( effect$, "MoveWithVelocity()", 0.0 ); WorldFXMgr.AttachSimulation( effect$, "ScaleChange( 0.025, 0.05, 0.0, 0.0 )", 0.0 ); WorldFXMgr.AttachSimulation( effect$, "AlphaChange( 0.03, 0.05, 0.0, 0.0 )", 0.0 ); WorldFXMgr.SetEffectSrcBlend( effect$, PB_SRCALPHA ); WorldFXMgr.SetEffectDestBlend( effect$, PB_DESTALPHA ); WorldFXMgr.AttachTargetToGo( SiegeTarget$, target$, "weapon_grip" ); return effect$; } startup state StartUp$ { event OnEnterState$ { rib1$ = create_rib$( RA_CAMERA_XAXIS ); rib2$ = create_rib$( RA_CAMERA_YAXIS ); } } event OnEffectHandleMessage$( eWorldEvent e$, WorldMessage msg$ ) { report.generic("Got a message\n"); if( e$ == WE_ANIM_OTHER ) { if( msg$.data1 == 'bswg' ) { { report.generic("swinging!!\n"); int accel$ = WorldFXMgr.AttachSimulation( rib1$, "ApplyForceAlongTargetVector( 0.0, 0.0, 1.0, 150, 0, 0, 0.1 )", 0.0 ); WorldFXMgr.DetachSimulation( rib1$, accel$, 0.7 ); int accel2$ = WorldFXMgr.AttachSimulation( rib1$, "ApplyForceAlongTargetVector( 0.0, 0.0, 1.0, -150, 0, 0, 0.5 )", 0.0 ); WorldFXMgr.DetachSimulation( rib1$, accel2$, 0.7 ); int color$ = WorldFXMgr.AttachSimulation( rib1$, "ColorChange( 0.0, 0.0, 0xFF6666FF, 0.0 )", 0.0 ); WorldFXMgr.DetachSimulation( rib1$, color$, 0.7 ); int color2$ = WorldFXMgr.AttachSimulation( rib1$, "ColorChange( 0.0, 0.0, 0xFF0000FF, 0.5 )", 0.0 ); WorldFXMgr.DetachSimulation( rib1$, color2$, 0.7 ); } // { int accel$ = WorldFXMgr.AttachSimulation( rib2$, "ApplyForceAlongTargetVector( 0.0, 0.0, 1.0, 150, 0, 0, 0.1 )", 0.0 ); WorldFXMgr.DetachSimulation( rib2$, accel$, 0.7 ); int accel2$ = WorldFXMgr.AttachSimulation( rib2$, "ApplyForceAlongTargetVector( 0.0, 0.0, 1.0, -150, 0, 0, 0.5 )", 0.0 ); WorldFXMgr.DetachSimulation( rib2$, accel2$, 0.7 ); int color$ = WorldFXMgr.AttachSimulation( rib2$, "ColorChange( 0.0, 0.0, 0xFF6666FF, 0.0 )", 0.0 ); WorldFXMgr.DetachSimulation( rib2$, color$, 0.7 ); int color2$ = WorldFXMgr.AttachSimulation( rib2$, "ColorChange( 0.0, 0.0, 0xFF0000FF, 0.5 )", 0.0 ); WorldFXMgr.DetachSimulation( rib2$, color2$, 0.7 ); } } if( msg$.data1 == 'eswg' ) { } } } ]]; }
More information about text formats
from bw templates\dev\test.gas
[dev,t:template,n:dev_sword_whip]
{
specializes = base_sword_template;
doc = "[TEST OBJECT] dev_sword_whip";
[aspect]
{
model = m_w_dag_003;
}
[attack]
{
attack_range = 0.5;
damage_max = 4;
damage_min = 2;
}
[common]
{
is_pcontent_allowed = false;
screen_name = "Knife Whip";
}
[gui]
{
inventory_height = 2;
inventory_icon = b_gui_ig_i_w_dgr_007;
inventory_width = 1;
}
[test_effect_playground]
{
effect = "whip_test";
target_hero = true;
}
}
[dev,t:template,n:dev_sword_whip2]
{
specializes = base_sword_template;
doc = "[TEST OBJECT] dev_sword_whip";
[aspect]
{
model = m_w_dag_003;
}
[attack]
{
attack_range = 0.5;
damage_max = 4;
damage_min = 2;
}
[common]
{
is_pcontent_allowed = false;
screen_name = "Knife Whip";
}
[gui]
{
inventory_height = 2;
inventory_icon = b_gui_ig_i_w_dgr_007;
inventory_width = 1;
}
[test_effect_playground]
{
effect = "whip_test2";
target_hero = true;
watch_hero = true;
}
}
from bw global\effects\efct_test.gas
[whip_test]
{
skrit=[[
property Goid target$ doc = "Target to run the effect on.";
startup state StartUp$
{
event OnEnterState$
{
int SiegeTarget$ = WorldFXMgr.CreateTarget();
int effect$ = WorldFXMgr.CreateRibbonEffect(SiegeTarget$, 0, RA_CAMERA_XAXIS);
WorldFXMgr.SetTargetDependence( effect$, false, false );
WorldFXMgr.SetEffectTexture( effect$, "b_sfx_band4" );
WorldFXMgr.SetQuadRendering( effect$, true );
WorldFXMgr.AttachSimulation( effect$, "SpawnParticles( 200, 0xFFFFFFAA, 0xFFFFFFAA, .1, .1)", 0.0 );
WorldFXMgr.AttachSimulation( effect$, "PositionAtTarget()", 0.0 );
WorldFXMgr.AttachSimulation( effect$, "AccelAlongTargetVector( 0.0, 0.0, 1.0, 20, 20 )", 0.0 );
WorldFXMgr.AttachSimulation( effect$, "MoveWithVelocity()", 0.0 );
WorldFXMgr.AttachSimulation( effect$, "ScaleChange( 0.05, 0.07, 0.0, 0.0 )", 0.0 );
WorldFXMgr.SetEffectSrcBlend( effect$, PB_SRCALPHA );
WorldFXMgr.SetEffectDestBlend( effect$, PB_DESTALPHA );
WorldFXMgr.AttachTargetToGo( SiegeTarget$, target$, "weapon_grip" );
}
}
]];
}
[whip_test2]
{
skrit=[[
property Goid target$ doc = "Target to run the effect on.";
int rib1$;
int rib2$;
int create_rib$( eRibbonAlign axis$ )
{
// $$$ Fix createribboneffect - eli
int SiegeTarget$ = WorldFXMgr.CreateTarget();
int effect$ = WorldFXMgr.CreateRibbonEffect( SiegeTarget$, 0, axis$ );
//effect$ = WorldFXMgr.CreateParticleEffect();
WorldFXMgr.SetTargetDependence( effect$, false, false );
WorldFXMgr.SetEffectTexture( effect$, "b_sfx_band4" );
//WorldFXMgr.SetEffectTexture( effect$, "b_sfx_sparkle01" );
WorldFXMgr.SetQuadRendering( effect$, true );
WorldFXMgr.AttachSimulation( effect$, "SpawnParticles( 300, 0xFF0000FF, 0xFF0000FF, .1, .1)", 0.0 );
//WorldFXMgr.AttachSimulation( effect$, "SpawnParticles( 3000, 0xFF000022, 0xFF000022, .25, .25)", 0.0 );
WorldFXMgr.AttachSimulation( effect$, "PositionAtTarget()", 0.0 );
WorldFXMgr.AttachSimulation( effect$, "AccelAlongTargetVector( 0.0, 0.0, 1.0, 16, 16 )", 0.0 );
WorldFXMgr.AttachSimulation( effect$, "MoveWithVelocity()", 0.0 );
WorldFXMgr.AttachSimulation( effect$, "ScaleChange( 0.025, 0.05, 0.0, 0.0 )", 0.0 );
WorldFXMgr.AttachSimulation( effect$, "AlphaChange( 0.03, 0.05, 0.0, 0.0 )", 0.0 );
WorldFXMgr.SetEffectSrcBlend( effect$, PB_SRCALPHA );
WorldFXMgr.SetEffectDestBlend( effect$, PB_DESTALPHA );
WorldFXMgr.AttachTargetToGo( SiegeTarget$, target$, "weapon_grip" );
return effect$;
}
startup state StartUp$
{
event OnEnterState$
{
rib1$ = create_rib$( RA_CAMERA_XAXIS );
rib2$ = create_rib$( RA_CAMERA_YAXIS );
}
}
event OnEffectHandleMessage$( eWorldEvent e$, WorldMessage msg$ )
{
report.generic("Got a message\n");
if( e$ == WE_ANIM_OTHER )
{
if( msg$.data1 == 'bswg' )
{
{
report.generic("swinging!!\n");
int accel$ = WorldFXMgr.AttachSimulation( rib1$, "ApplyForceAlongTargetVector( 0.0, 0.0, 1.0, 150, 0, 0, 0.1 )", 0.0 );
WorldFXMgr.DetachSimulation( rib1$, accel$, 0.7 );
int accel2$ = WorldFXMgr.AttachSimulation( rib1$, "ApplyForceAlongTargetVector( 0.0, 0.0, 1.0, -150, 0, 0, 0.5 )", 0.0 );
WorldFXMgr.DetachSimulation( rib1$, accel2$, 0.7 );
int color$ = WorldFXMgr.AttachSimulation( rib1$, "ColorChange( 0.0, 0.0, 0xFF6666FF, 0.0 )", 0.0 );
WorldFXMgr.DetachSimulation( rib1$, color$, 0.7 );
int color2$ = WorldFXMgr.AttachSimulation( rib1$, "ColorChange( 0.0, 0.0, 0xFF0000FF, 0.5 )", 0.0 );
WorldFXMgr.DetachSimulation( rib1$, color2$, 0.7 );
}
//
{
int accel$ = WorldFXMgr.AttachSimulation( rib2$, "ApplyForceAlongTargetVector( 0.0, 0.0, 1.0, 150, 0, 0, 0.1 )", 0.0 );
WorldFXMgr.DetachSimulation( rib2$, accel$, 0.7 );
int accel2$ = WorldFXMgr.AttachSimulation( rib2$, "ApplyForceAlongTargetVector( 0.0, 0.0, 1.0, -150, 0, 0, 0.5 )", 0.0 );
WorldFXMgr.DetachSimulation( rib2$, accel2$, 0.7 );
int color$ = WorldFXMgr.AttachSimulation( rib2$, "ColorChange( 0.0, 0.0, 0xFF6666FF, 0.0 )", 0.0 );
WorldFXMgr.DetachSimulation( rib2$, color$, 0.7 );
int color2$ = WorldFXMgr.AttachSimulation( rib2$, "ColorChange( 0.0, 0.0, 0xFF0000FF, 0.5 )", 0.0 );
WorldFXMgr.DetachSimulation( rib2$, color2$, 0.7 );
}
}
if( msg$.data1 == 'eswg' )
{
}
}
}
]];
}