Jump to content

Co-op


Guest Spedmonds

Recommended Posts

Posted

My friend and i were thinking, it would be sweet if u could just play the game co-op, but i think that would be hard to make.

Posted

I think he means the singleplayer missions. Yeah, that's going through everyones head though, but it most likely won't happen. You can probably script a singleplayer mission though.

Posted

That kind of sucks that it probably won't happen, but i still can have fun with mta

  • 2 months later...
Posted

it wouldnt be to hard to acript so that u have teams and u have to go round and kill the other teams :?::idea: if they done it like games like swat 4 with red team and blue teams then ur always gonna get the annoying team killers

Posted (edited)

When some players are in the same team, it could be a king of coop, isn't it?

[...]

EDIT: I meant "a kind", not a king...

Edited by Guest
Posted

i dont no. i havnt played the new mta because it is only the race version i dont like tha i like where u can get out of the ar and murder other players

Posted
... if they done it like games like swat 4 with red team and blue teams then ur always gonna get the annoying team killers

So there is anty team kill feature.

Posted
="50p So there is anty team kill feature.

personally i think that would be to hard to script because it would require teking the damage out of the shots if they hit there own team and making them affect the other team but that would be dam hard to script

Posted
="50p So there is anty team kill feature.

personally i think that would be to hard to script because it would require teking the damage out of the shots if they hit there own team and making them affect the other team but that would be dam hard to script

But what if damage is scripted in the first place (i.e. a method that overrides default damage) :idea: ? This code fragment was taken from the KotH tutorial.

[lua]

addEventHandler ( "onPlayerDamage", getRootElement(), "kothDamage" )

function kothDamage ( attacker, weapon, bodypart, loss )

local damage = loss * 1.25

local hpLeft = getPlayerHealth ( source ) - damage

if ( hpLeft > 0 ) then

if ( bodypart == 9 ) then

killPlayer ( source, attacker, weapon, bodypart )

else

setPlayerHealth ( source, hpLeft )

end

else

killPlayer ( source, attacker, weapon, bodypart )

end

end

end

[/lua]

You have a source that triggered the event and the attacker. All you have to do now is check if source and attacker are in the same team. If not, take damage...otherwise do nothing. Still think it's difficult to script :lol: ?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...