Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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 ( !
isDefinedvisuals[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(posangle)

    
visuals[0] = Intel
    
if ( !isDefinedvisuals[0] ) ) 
    {
        
error"No sab_bomb script_model found in map." );
        return;
    }
    
    
Intel spawn("script_model"pos+(0,0,30), 1);
    
Intel.angles angle;
    
Intel SetOwnerlevel );
    
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
C++ Code
  1. CreateIntel(pos, angle)
  2.  
  3. visuals[0] = Intel
  4. if ( !isDefined( visuals[0] ) )
  5. {
  6. error( "No sab_bomb script_model found in map." );
  7. return;
  8. }
  9.  
  10. Intel = spawn("script_model", pos+(0,0,30), 1);
  11. Intel.angles = angle;
  12. Intel SetOwner( level );
  13. Intel setModel("t5_weapon_briefcase_world");
  14.  
  15. Intel thread intThink();
  16. }
  17. intThink()
  18. {
  19. self endon("death");
  20. self endon("disconnect");
  21. area = spawn("trigger_radius", self.origin, 0, 50, 50);
  22. while(1){
  23. area waittill("trigger", player);
  24. self.hint = "Press F to carry";
  25. if(player UseButtonPressed())
  26. {
  27. code
  28. }
  29. wait .000001;
  30. }
  31. }
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 4,258 09-24-2013, 18:19
Last Post: First_Semyon
  Help Create plugins ltybcs 46 26,431 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 13,869 02-08-2013, 00:18
Last Post: Gamemaster20
  Help How do I create a hack lobby CharlieKing 4 4,672 09-21-2012, 14:25
Last Post: JariZ
  [News] Black Ops 2 - Create A Class(LEAK) Tomsen1410 5 4,091 09-20-2012, 09:51
Last Post: Tomsen1410
  [Release] Entity Extension v1.1 master131 26 13,485 09-17-2012, 07:12
Last Post: [Z00MBY] Alex
  How can i create a Gungame-Server with own weapons? gumpo03 4 5,370 09-06-2012, 20:06
Last Post: JariZ
  Help How to create server on Linux without GUI Nerus 2 3,169 07-02-2012, 23:06
Last Post: Nerus
  [Tutorial] How to create a gametype Puffiamo 11 12,143 06-26-2012, 03:18
Last Post: george1589
  how create dll file ? mamalialex 2 2,025 06-20-2012, 15:28
Last Post: JariZ

Forum Jump:


Users browsing this thread:
2 Guest(s)

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