Grab item = no bonus.

1) I made an item pseudo_weapon.
When i take it - it changes player's var - working nice.
But how to prevent item to take bonuses for grabing.
score 1000 gives 1000$
remove score 0r set score 0 will give a life
score -1 gives over 5000 lifes
:o

-----
2) When i set item subtype "project" - i only can grab one item and after that cant grab any of my items
a_cannonball.txt
a_none.txt
a_pistol.txt
What "project" actualy do?
-----
3) Grab item key input (press attack) can be changed to (for example) down+attack or specialattack key?
 
2) Never tried subtype project before so can't help you there, sorry  :-[

1) Why not set score 1 and deduct this score in didhitscript?
like this:
Code:
    void target = getlocalvar("damagetaker"); // Get player who picks the item
    int PIndex = getentityproperty(target,"playerindex"); // Get player's index
    int PScore = getplayerproperty(PIndex,"score"); // Get player's score

    changeplayerproperty(PIndex, "score", PScore-1);

3) The only way I know is (after removing GET animation) to use script to check for any nearby items (within defined range) and pick the item, when the command is run
 
Bloodbane said:
1) Why not set score 1 and deduct this score in didhitscript?
like this:
Code:
    void target = getlocalvar("damagetaker"); // Get player who picks the item
    int PIndex = getentityproperty(target,"playerindex"); // Get player's index
    int PScore = getplayerproperty(PIndex,"score"); // Get player's score

    changeplayerproperty(PIndex, "score", PScore-1);

looks like score adding moment (from item) works after didhitscript ends.
changeplayerproperty(player_number, "score", PScore-1) doesnt affect if score is 0 - we got +1.
score cant be negative?
 
Back
Top Bottom