AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Creating Entity outside the Map (https://forums.alliedmods.net/showthread.php?t=107014)

KadiR 10-21-2009 14:07

Creating Entity outside the Map
 
How can I create a simple entity outside the map ?

Hawk552 10-21-2009 14:19

Re: Creating Entity outside the Map
 
PHP Code:

new ent create_entity"info_target" )

entity_set_originentFloat:{ 4096.04096.04096.0 } ) 


KadiR 10-21-2009 15:56

Re: Creating Entity outside the Map
 
Thanks!

But why does it say to me:

Quote:

Warning: Loose indentation on line x
?

OneMoreLevel 10-21-2009 16:25

Re: Creating Entity outside the Map
 
Press ctrl-I, if that doesnt work, show us your code.

tpt 10-21-2009 16:28

Re: Creating Entity outside the Map
 
Quote:

Originally Posted by OneMoreLevel (Post 968758)
Press ctrl-I, if that doesnt work, show us your code.

I hate that answer. People will never know what they had wrong if they just use automatic indentation to solve this problem. Automatic indenter might also lead to more warnings or errors. :wink:

ot_207 10-22-2009 08:22

Re: Creating Entity outside the Map
 
Quote:

Originally Posted by tpt (Post 968765)
I hate that answer. People will never know what they had wrong if they just use automatic indentation to solve this problem. Automatic indenter might also lead to more warnings or errors. :wink:

No, not really. It was a good indication of what to directly do.
If he sees the code organized he will understand (probably) what that means.

tpt 10-22-2009 12:16

Re: Creating Entity outside the Map
 
Quote:

Originally Posted by ot_207 (Post 969120)
No, not really. It was a good indication of what to directly do.
If he sees the code organized he will understand (probably) what that means.

No, not really. The program will do the job for you and in some cases you might not see the difference. People who doesn't know what proper indentation is they shouldn't be coding. :wink:

KadiR 10-22-2009 12:36

Re: Creating Entity outside the Map
 
Quote:

Originally Posted by OneMoreLevel (Post 968758)
Press ctrl-I, if that doesnt work, show us your code.

ah cool thanks, did worked :)

KadiR 11-28-2009 18:10

Re: Creating Entity outside the Map
 
I do not know really what:

PHP Code:

entity_set_originentFloat:{ 4096.04096.04096.0 } ) 

do, but I think the position..

Whats the difference to this?

PHP Code:

Float:{ 2237.0, -475.0, -322.0 }, Float:{ -463.0, -487.0, -322.0 } ); 

2 Floats? I wanted to create an entity from x position to y position, is this possible?

Something like this positions:

http://i45.tinypic.com/2s7ufpf.jpg

hleV 11-28-2009 18:13

Re: Creating Entity outside the Map
 
Code:
entity_set_origin( ent, { 4096.0, 4096.0, 4096.0 } )


All times are GMT -4. The time now is 17:32.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.