| Blockland Forums > Modification Help |
| Spawning an item |
| (1/1) |
| Swollow:
--- Code: --- %x = getWord(%pos, 0); %y = getword(%pos, 1); %z = getWord(%pos, 2); %i = new Item() { dataBlock = FastRadioBeaconItem; initialPosition = vectorAdd(%x SPC %y SPC %z, "0 0 0"); initialVelocity = "0 0 10"; //client = %client; }; MissionCleanup.add(%i); --- End code --- Whats wrong with this? |
| phflack:
rest of the code? |
| Swollow:
--- Code: ---function FastBeaconProjectile::OnExplode(%this,%obj,%pos) { %vertDist = 200; %r = containerRayCast(vectoradd(%pos,"0 0 1"), vectorAdd(%pos, "0 0 200"), $typemasks::InteriorObjectType); if(%r) { %hitheight = getWord(%r, 3); %newVertDist = %hitHeight - getWord(%pos, 2); if(%newvertDist < 500) { %x = getWord(%pos, 0); %y = getword(%pos, 1); %z = getWord(%pos, 2); %i = new Item() { dataBlock = FastRadioBeaconItem; initialPosition = vectorAdd(%x SPC %y SPC %z, "0 0 0"); initialVelocity = "0 0 10"; //client = %client; }; MissionCleanup.add(%i); commandToClient(%obj.client, 'BottomPrint', "<color:00ff00>Use the Motar Airstrike outside.", 4); return; } } %shellmax = getRandom(15,25); for(%s=0;%s<=%shellmax;%s++) schedule(getRandom(0,5000), 0, FastMissiledropshell, %pos, %obj.client); } --- End code --- |
| Navigation |
| Message Index |