Posts: 916
Threads: 65
Joined: Jun 2011
(07-08-2011, 23:43)4FunPlayin Wrote: (07-08-2011, 23:42)Scripts18 Wrote: (07-08-2011, 18:24)Lemon Wrote: (07-08-2011, 17:24)iAegle Wrote: (07-08-2011, 17:13)Lemon Wrote: But you don't know how to make it?
Depends on what skin and what model its used on...
I'll zombify a normal soldier skin. add some blood, rotten effect etc.
why not do a scripting code like self set model? because that won't work
why wont it?
Posts: 1,911
Threads: 183
Joined: Nov 2010
Reputation:
35
(07-08-2011, 18:26)4FunPlayin Wrote: just edit some nva skins and sog skins, for example nva has hats and sog don't (correct me if I'm wrong)
I tried to find the skin files; but failed. Help me, you have so much free time.
Posts: 2,114
Threads: 278
Joined: Oct 2010
Reputation:
41
(07-08-2011, 23:48)Lemon Wrote: (07-08-2011, 18:26)4FunPlayin Wrote: just edit some nva skins and sog skins, for example nva has hats and sog don't (correct me if I'm wrong)
I tried to find the skin files; but failed. Help me, you have so much free time.
if that fails hau da fuk u plan to make different skins
and please, I don't have free times, I'm programmed to download internet porn to my software.
Posts: 1,911
Threads: 183
Joined: Nov 2010
Reputation:
35
Posts: 916
Threads: 65
Joined: Jun 2011
(07-09-2011, 14:40)Lemon Wrote: Added two new questions.
http://wiki.modsrepository.com/index.php...sLookingAt
level.player islookingat( trigger );
Posts: 62
Threads: 4
Joined: Jul 2011
Reputation:
1
(07-08-2011, 14:43)Lemon Wrote: 7 - When I spawn an entity it floats in air, how to make gravity affect it?
You can use the 'physicsLaunch' function and call it on the entity e.g.
PHP Code: ent physicsLaunch( contact_point, initial_force );
Check out the 'cratePhysics' function in 'maps\mp\gametypes\gametypes\_supplydrop.gsc'. This is the func that adds physics to the spawned crate when you get a care package.
Posts: 1,911
Threads: 183
Joined: Nov 2010
Reputation:
35
(07-13-2011, 15:36)Phl3x_ Wrote: (07-08-2011, 14:43)Lemon Wrote: 7 - When I spawn an entity it floats in air, how to make gravity affect it?
You can use the 'physicsLaunch' function and call it on the entity e.g.
PHP Code: ent physicsLaunch( contact_point, initial_force );
Check out the 'cratePhysics' function in 'maps\mp\gametypes\gametypes\_supplydrop.gsc'. This is the func that adds physics to the spawned crate when you get a care package.
Thanks, I've found it yesterday and it works fine.
Posts: 62
Threads: 4
Joined: Jul 2011
Reputation:
1
(07-08-2011, 14:43)Lemon Wrote: 6 - How can I spawn an entity in front of me(I know how to spawn them, but I can't make it spawn in front of me?)
Do you mean spawn it in your line of sight? If so, you could try this:
PHP Code: distFromPlayer = 200; // Distance the entity is from you, change to whatever you want spawnPos = self getPlayerEyePosition() + vectorScale(anglesToForward(self getPlayerAngles()), distFromPlayer); // This calculates the spawn pos of the entity ent = spawn("script_model", spawnPos); ent setModel("mp_supplydrop_ally");
You'll also need these two functions, I think they might be in a util gsc file, but I don't know so I wrote them here:
PHP Code: vectorScale(vec, scale) { return (vec[0] * scale, vec[1] * scale, vec[2] * scale); } getPlayerEyePosition() { eye = self.origin + (0, 0, 60); if(self getStance() == "crouch") eye -= (0, 0, 20); else if(self getStance() == "prone") eye -= (0, 0, 49);
return eye; }
Posts: 1,911
Threads: 183
Joined: Nov 2010
Reputation:
35
(07-14-2011, 01:26)Phl3x_ Wrote: (07-08-2011, 14:43)Lemon Wrote: 6 - How can I spawn an entity in front of me(I know how to spawn them, but I can't make it spawn in front of me?)
Do you mean spawn it in your line of sight? If so, you could try this: I'll try it but what i really want is the sentrygun placement. sentry gun stays in front of you, you cant jump, place it everywhere etc.
Posts: 62
Threads: 4
Joined: Jul 2011
Reputation:
1
(07-14-2011, 01:45)Lemon Wrote: I'll try it but what i really want is the sentrygun placement. sentry gun stays in front of you, you cant jump, place it everywhere etc
Ah, change 'self getPlayerAngles()' to 'self.angles'. If you use self.angles, it doesn't use the z axis so the entity will always spawn at the same height. Make sure you change the distFromPlayer value to something smaller so it spawns closer like a sentry gun does.
If you don't want the player to be able to jump, call 'allowJump(false)' on the player.
|