|
M0uS3
|
|

Newspaper Boy
      
Group: Members
Posts: 794
Member No.: 436
Joined: 12-October 06

|
ok... i made a crossbow that shoots sawblades, and i want them to rotate while flying
i tryed to make the sawblades fly with the "hot iron", but i couldn't make it shot and spawn a sawblade stuck to the shot... shot has no aparently isntance name...
i just need the sawblades to spin in the air and get stuck in walls...
edited version of the melon gun:
sawblade.lua
CODE |
--##############################
--## Hide and Seek
--## fayte,
--##############################
--## How powerfully the melon is shot.
SHOT_POWER = 90000000;
--###########################################################################
MyIndex � � = 0;
Owner � � �= 0;
CurrentTime � � = 0;
function onInit()
_EntPrecacheModel("models/props_junk/sawblade001a.mdl");
_SWEPSetSound(MyIndex, "single_shot", "weapon_crossbow.Single")
end
function onThink()
end
function onPrimaryAttack()
if (_PlayerInfo(Owner, "alive") == false) then
�return
end
local melon = _EntCreate( "prop_physics" );
local spawner = _EntCreate( "prop_physics" );
local aim = _PlayerGetShootAng(Owner);
aim.x = aim.x * SHOT_POWER
aim.y = aim.y * SHOT_POWER
aim.z = aim.z * SHOT_POWER
_EntSetModel(melon, "models/props_junk/sawblade001a.mdl");
_EntSetOwner(melon, Owner);
_EntSetPos(melon, _PlayerGetShootPos(Owner));
_EntSetAng(melon, _PlayerGetShootAng(Owner));
_EntSetKeyValue(melon, "fademindist", -1);
_EntSetKeyValue(melon, "fademaxdist", 0);
_EntSetKeyValue(melon, "fadescale", 0);
_EntSpawn(melon);
_PhysApplyForce(melon, aim);
_EntFire(melon,"kill","",5);
_SWEPUseAmmo(MyIndex, 0, 1);
end
function onSecondaryAttack()
_EntSetMoveType(Owner,2)
local vPlayerAng = _PlayerGetShootAng(Owner);
local vPlayerVel = vecMul(vPlayerAng,vector3(700, 700, 700));
_EntSetVelocity(Owner,vPlayerVel);
end
function getPrintName() return "sawcross"; end
function getClassName() return "sawcross"; end
function getPrimaryAmmoType() return "buckshot"; end
function getSecondaryAmmoType() return ""; end
function getViewModel() return "models/weapons/v_crossbow.mdl"; end
function getWorldModel() return "models/weapons/w_crossbow.mdl"; end
function getAnimPrefix() return "shotgun"; end
function getWeaponSwapHands() return false; end
function getWeaponFOV() return 75; end
function getWeaponSlot() return 2; end
function getWeaponSlotPos() return 3; end
function getFiresUnderwater() return false; end
function getReloadsSingly() return false; end
function getDamage() return 0; end
function getPrimaryShotDelay() return 1; end
function getSecondaryShotDelay() return 0.5; end
function getPrimaryIsAutomatic() return false; end
function getSecondaryIsAutomatic() return false; end
function getMaxClipPrimary() return 0; end
function getMaxClipSecondary() return 0; end
function getDefClipPrimary() return 0; end
function getDefClipSecondary() return 0; end
function getPrimaryScriptOverride() return 1; end
function getSecondaryScriptOverride() return 2; end
function getBulletSpread() return vector3(0.01, 0.01, 0.01); end
function getViewKick() return vector3(0, 0.0, 0.0); end
function getViewKickRandom() return vector3(2.0, 1.0, 1.0); end
|
PLZ HELP!
--------------------
..:.:.:::[FPS]SparK:::.:.:..
"Divide by 0 is multiply by the infinite" x/0 = x*<..>
Working on:
:()nline mod - 30%
Paint-Life - 60%
PortalPack X2 - 70%
PATLABOR pack - 20%
QUITE B - 100% link
PATLABOR
--------------------------------------
70 97 119 108 108 32 80 87 78 69 82 - dec/char
Jaumd llmeF - USD
46 61 77 6c 6c 20 50 57 4e 45 52 - HEX
|
|
|
ExitE
|
Thank you for collaborating.
|

ExitE
Group: Adversing
Post: 436
Member No.: 011233
Joined: 16-June 06

|
|
|
|
BlacK DusT RideR
|
|

The Cat - Fawll Enemy
      
Group: Members
Posts: 674
Member No.: 532
Joined: 11-November 06

|
PEACE
--------------------
Friends of the Cat:
botl!ke* | jaysc | Muscar Campweed | Zini214 | OWNER
dude2193 | KAP'N Crinch | zombie112 | Firehead | Mous3
Merijn | FamilyGuy | --Strattus-- | Limited | kai81123
Techno-Man | matts2cant | Lolface | fpsjay | tomatmann
Viter112 | Dragory | Combine_A
Enemy of the Cat:
Fawll
To get a friend of the cat click here
##################
Portal Texture Pack by FamilyGuy and Me


^For the record: I made these ones!


LESS THAN THREE, OMG, LOVE COMPUTER FANTASY, MEET ME HERE ON IRC, LOLOL
|
|
|
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
[ Script Execution time: 0.0491 ] [ 13 queries used ] [ GZIP Enabled ]
|
|