Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pick up and name it - SP
#1
Can anyone help me to fix this?
It it would work, it would help me to find model names faster in SinglePlayer, to use them in MP.
The problem is inside the for(), but I can't fix it Undecided

PHP Code:
pickup()
{
    
    
self endon("death");
    
self notifyOnPlayerCommand"dpad_up""+frag" );
        
    for(;;){
        
self waittill"dpad_up" );
        
vec anglestoforward(self getPlayerAngles());
        
end = (vec[0] * 100vec[1] * 100vec[2] * 100);
        
entity BulletTraceself gettagorigin("tag_eye"), self gettagorigin("tag_eye")+(vec[0] * 100vec[1] * 100vec[2] * 100), 0self )[ "entity" ];
        if( 
isdefined(entity.model) || IsPlayer(entity) ) 
            {
            
self iPrintLnentity.model );
            
//self SendToConsole( entity.model );
            
self waittill"dpad_up" );
            }
        }


The game is loading it in, but it doesn't have anny effect. I'm calling it from arcadia.gsc's main() with "level thread pickup();"
Reply

#2
Try level.player[0] or level.player[1] or just level.player ( or even level.player0 ), I've saw something in mw2 sp gscs. 'level' is global struct. It contains a lot of another stuff.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#3
(02-14-2014, 16:17)SailorMoon Wrote: Try level.player[0] or level.player[1] or just level.player ( or even level.player0 ), I've saw something in mw2 sp gscs. 'level' is global struct. It contains a lot of another stuff.

Do you mean level.players ?
Also where should I put it? ._.


New question:
How can I spawn this?
[Image: 7MB025t.png]

Tried with this code on Underpass, but there is no visible model, only the Collision spawns: (It does work but com_plasticcase_friendly)

PHP Code:
In init:
precachemodel ("com_junktire");  (console says no error about it)

in a called thread:
SpawnCrate {
            
self endon("death");
    
self notifyonplayercommand("smoke""+smoke");
        
self notifyOnPlayerCommand"dpa""+melee" );
    for(;;){
        
self waittill"smoke" );
                
self waittill"dpa" );
        if(
self.ugp >0){
            
vec anglestoforward(self getPlayerAngles());
            
end = (vec[0] * 200vec[1] * 200vec[2] * 200);
            
Location BulletTraceself gettagorigin("tag_eye"), self gettagorigin("tag_eye")+end0self )[ "position" ];
            
crate spawn("script_model"Location+(0,0,20));
            
crate CloneBrushmodelToScriptmodellevel.airDropCrateCollision );
            
crate setModel"com_junktire" );
            
crate PhysicsLaunchServer( (0,0,0), (0,0,0));
            
crate.angles self.angles+(0,90,0);
            
crate.health 800;
            
self thread crateManageHealth(crate);
            
self.ugp--;
            }
        }

Reply

#4
You need to 'PrecacheModel';
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#5
(02-15-2014, 23:55)SailorMoon Wrote: You need to 'PrecacheModel';

I told that already:
Quote:In init:
precachemodel ("com_junktire"); (console says no error about it)

Also it is on the Underpass map by default, they are working but I can't spawn any visible one :/
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

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