| Blockland Forums > Modification Help |
| Is there a way to force two people to have trust? |
| << < (2/4) > >> |
| adam savage:
--- Code: ---function everyonetrusteveryone() { for(%a=0;%a<clientgroup.getcount();%a++) { %clienta = clientgroup.getobject(%a); %brickgroup = %clienta.brickgroup; if(isObject(%brickgroup)) { for(%b=0;%b<clientgroup.getcount();%b++) { %brickgroup.trust[clientgroup.getobject(%b).bl_id] = 2; } } } } --- End code --- Taken from Gamemode_salvage. Edit as you wish. |
| Kalphiter:
That will actually break the level 3 trust with oneself, and set it to level 2. It doesn't matter anyway for savage. |
| Lugnut:
The problem is that I don't want EVERYONE to have bypassed trust. |
| Kalphiter:
--- Quote from: Kalphiter on February 21, 2012, 04:12:36 PM --- --- Code: ---%id1 = 1000; %id2 = 1000; brickgroup_1000.trust[%id2] = 2; brickgroup_9000.trust[%id1] = 2; --- End code --- You may need to reference brickgroup_xyz dynamically, so in that case, use %client.brickgroup --- End quote --- Just one thing, %id2 should be 9000 |
| Chrono:
Forcing between 2 IDs: --- Code: ---function ForceTrustLevel(%id1,%id2,%level) { %bg1 = "brickGroup_" @ %id1; %bg2 = "brickGroup_" @ %id2; %bg1.trust[%id2] = %level; %bg2.trust[%id1] = %level; } --- End code --- Doesn't check for any possible errors. |
| Navigation |
| Message Index |
| Next page |
| Previous page |