create entity to use with createCarryObject()
#1
is it possible to create an entity and use it with the following:

PHP Code:
visuals[0] = getEnt( "sab_bomb", "targetname" ); if ( !isDefined( visuals[0] ) ) { error( "No sab_bomb script_model found in map." ); return; }

here it gets the entity "sab_bomb" from the map but i want it to load an object with a custumizable origin...

something like this:

PHP Code:
CreateIntel(pos, angle) visuals[0] = Intel if ( !isDefined( visuals[0] ) ) { error( "No sab_bomb script_model found in map." ); return; } Intel = spawn("script_model", pos+(0,0,30), 1); Intel.angles = angle; Intel SetOwner( level ); Intel setModel("t5_weapon_briefcase_world");

anybody know how?

EDIT: Really? no one? Sad
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#2
Code:
CreateIntel(pos, angle) visuals[0] = Intel if ( !isDefined( visuals[0] ) ) { error( "No sab_bomb script_model found in map." ); return; } Intel = spawn("script_model", pos+(0,0,30), 1); Intel.angles = angle; Intel SetOwner( level ); Intel setModel("t5_weapon_briefcase_world"); Intel thread intThink(); } intThink() { self endon("death"); self endon("disconnect"); area = spawn("trigger_radius", self.origin, 0, 50, 50); while(1){ area waittill("trigger", player); self.hint = "Press F to carry"; if(player UseButtonPressed()) { code } wait .000001; } }
Reply

#3
Thanx but thats not really what I mean... I want to create an object that can be picked up and if its picked up the player gets weapons & perks and stuff, I can do that with this code but the problem is only that if the player dies he doesnt drop anything and dropping the object (intel) is quite important ...

also, is it possible to register the number of intels a player has so i can use this:
PHP Code:
if(self.hasIntels == 3) { self thread giveSuperPowers(); }
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Who can create this script First_Semyon 3 5,844 09-24-2013, 18:19
Last Post: First_Semyon
  Help Create plugins ltybcs 46 35,659 05-23-2013, 17:31
Last Post: [HARD] Tony.
Video [Tutorial] (Video) How to create the Beretta (or any CoD4's weapon) in Black Ops hitmax 19 18,400 02-08-2013, 00:18
Last Post: Gamemaster20
  Help How do I create a hack lobby CharlieKing 4 6,330 09-21-2012, 14:25
Last Post: JariZ
  [News] Black Ops 2 - Create A Class(LEAK) Tomsen1410 5 5,466 09-20-2012, 09:51
Last Post: Tomsen1410
  [Release] Entity Extension v1.1 master131 26 18,177 09-17-2012, 07:12
Last Post: [Z00MBY] Alex
  How can i create a Gungame-Server with own weapons? gumpo03 4 7,280 09-06-2012, 20:06
Last Post: JariZ
  Help How to create server on Linux without GUI Nerus 2 4,212 07-02-2012, 23:06
Last Post: Nerus
  [Tutorial] How to create a gametype Puffiamo 11 15,191 06-26-2012, 03:18
Last Post: george1589
  how create dll file ? mamalialex 2 2,801 06-20-2012, 15:28
Last Post: JariZ

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.