Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
maybe at first set .maxhealth
and then the current health so for example:
Code: box.maxhealth = 100;
box.health = 100;
Posts: 106
Threads: 35
Joined: Jun 2011
Reputation:
1
(09-22-2011, 15:41)Tomsen1410 Wrote: maybe at first set .maxhealth
and then the current health so for example:
Code: box.maxhealth = 100;
box.health = 100;
i put what u said but didnt work
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
09-24-2011, 17:20
(This post was last modified: 09-24-2011, 17:20 by iAegle.)
Code: createBlock( location, angle )
{
block = spawn( "script_model", location, 1 );
block setModel( "mp_supplydrop_ally" );
block.angles = angle;
block.maxhealth = 100;
block.health = 100;
block SetCanDamage( true );
}
...?
Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
But it should work without that or not?
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
(09-24-2011, 21:56)Tomsen1410 Wrote: But it should work without that or not?
without what?
Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
(09-24-2011, 22:09)iAegle Wrote: (09-24-2011, 21:56)Tomsen1410 Wrote: But it should work without that or not?
without what?
block SetCanDamage( true )
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
(09-24-2011, 22:09)Tomsen1410 Wrote: (09-24-2011, 22:09)iAegle Wrote: (09-24-2011, 21:56)Tomsen1410 Wrote: But it should work without that or not?
without what?
block SetCanDamage( true )
If you want them to be destroyed .. then no it wont work without
Posts: 106
Threads: 35
Joined: Jun 2011
Reputation:
1
(09-24-2011, 17:20)iAegle Wrote: Code: createBlock( location, angle )
{
block = spawn( "script_model", location, 1 );
block setModel( "mp_supplydrop_ally" );
block.angles = angle;
block.maxhealth = 100;
block.health = 100;
block SetCanDamage( true );
}
...?
ok os i put
createBlock(origin, angle)
{
block = spawnstruct();
block.location = origin;
block SetOwner( level );
block.angle = angle;
block.maxhealth = 175;
block.health = 175;
block SetCanDamage(true);
return block;
}
and its not working....
Posts: 1,185
Threads: 72
Joined: Jan 2011
Reputation:
25
just make that what iAgle wrote...
dont "return" anything and dont change anything
Posts: 1,830
Threads: 104
Joined: Jan 2011
Reputation:
46
(09-26-2011, 04:50)Gamemaster20 Wrote: (09-24-2011, 17:20)iAegle Wrote: Code: createBlock( location, angle )
{
block = spawn( "script_model", location, 1 );
block setModel( "mp_supplydrop_ally" );
block.angles = angle;
block.maxhealth = 100;
block.health = 100;
block SetCanDamage( true );
}
...?
ok os i put
createBlock(origin, angle)
{
block = spawnstruct();
block.location = origin;
block SetOwner( level );
block.angle = angle;
block.maxhealth = 175;
block.health = 175;
block SetCanDamage(true);
return block;
}
and its not working....
Dude, its a fucking spawnStruct ofcourse its not working
|