I'm trying to add the coins that you need to collect from the Coin Collect cartoon demo that came with game guru. I thought I'd reach out for help here.
Coin Collect script:
function coincollect_init(e)
end
function coincollect_main(e)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 80 then
PlaySound(e,0)
CoinCount=CoinCount+1
Destroy(e)
end
end
------------------------RADAR objective script:
haveAddedObjective = {}
function objective_init(e)
haveAddedObjective[e] = 0
end
function objective_main(e)
if haveAddedObjective[e] == 0 then
if addObjective ~= nil then
addObjective(e)
end
haveAddedObjective[e] = 1
end
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 150 and g_PlayerHealth > 0 then
PromptDuration("You have reached an objective",3000)
PlaySound(e,0)
SetEntityHealth(e,0)
Destroy(e)
end
end
The author of this post has marked a post as an answer.
Go to answer