Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request How to use gameobjects?
#1
Can anyone make a tutorial on how to use gameobjects .. you know like the SnD bombs and the CTF flags.

I tried
Code:
createUploadPoint( team )
{
    hqPoints = getEntArray( "hq_hardpoint", "targetname" );
    visuals = [];
    visuals[0] = hqPoints[ randomInt( hqPoints.size ) ];
    
    trigs = getEntArray( "radiotrigger", "targetname" );
    trigger = undefined
    for( i = 0; i < trigs.size; i++ )
    {
        if ( visuals[0] isTouching( trigs[i] ) )
        {
            trigger = trigs[i];
            break;
        }
    }
    
    uploadPoint = maps\mp\gametypes\_gameobjects::createUseObject( team, trigger, visuals, (0,0,64) );
    uploadPoint maps\mp\gametypes\_gameobjects::allowUse( "enemy" );
    uploadPoint maps\mp\gametypes\_gameobjects::setUseTime( level.plantTime );
    uploadPoint maps\mp\gametypes\_gameobjects::setUseText( &"MP_PLANTING_EXPLOSIVE" );
    uploadPoint maps\mp\gametypes\_gameobjects::setUseHintText( "Hold [{+activate}] to upload the intel" );
    uploadPoint maps\mp\gametypes\_gameobjects::set2DIcon( "friendly", "compass_waypoint_defend" );
    uploadPoint maps\mp\gametypes\_gameobjects::set3DIcon( "friendly", "waypoint_defend" );
    uploadPoint maps\mp\gametypes\_gameobjects::set2DIcon( "enemy", "compass_waypoint_target" );
    uploadPoint maps\mp\gametypes\_gameobjects::set3DIcon( "enemy", "waypoint_target" );
    uploadPoint maps\mp\gametypes\_gameobjects::setVisibleTeam( "none" );
    uploadPoint.onUse = ::onUse;
    uploadPoint.onBeginUse = ::onBeginUse;
    uploadPoint.onEndUse = ::onEndUse;
    
    return uploadPoint;
}

but it seems to screw up.. I used
Code:
self iPrintLnBold( "^1WORKS" );
on the onUse function but it doesn't say anything Sad
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#2
I pm'd you my sd bomb ammo box script
[Image: MaEIQ.png]
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.