Raised This Month: $ Target: $400
 0% 

placing a model on a map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 07-06-2007 , 20:04   placing a model on a map
Reply With Quote #1

how can i place a model on the middle of a map no matter what map it is?
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
AlMod
Member
Join Date: Nov 2006
Old 07-07-2007 , 00:02   Re: placing a model on a map
Reply With Quote #2

Try something like that:
PHP Code:
public place_entity_on_map()
{
            new 
ent create_entity("info_target")
            new 
origin[3] = {0,0,0// Change zeros to needed coords
            
entity_set_model(ent,"models/model.mdl")

engine module is required

Last edited by AlMod; 07-07-2007 at 00:04.
AlMod is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 07-07-2007 , 16:08   Re: placing a model on a map
Reply With Quote #3

thx.
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 07-08-2007 , 01:15   Re: placing a model on a map
Reply With Quote #4

Quote:
Originally Posted by AlMod View Post
PHP Code:
public place_entity_on_map()
{
            new 
ent create_entity("info_target")
            new 
origin[3] = {0,0,0// Change zeros to needed coords
            
entity_set_model(ent,"models/model.mdl")

In that code replace...
new origin[3] = {0,0,0}

With...
entity_set_origin(ent, Float:{0.0, 0.0, 0.0});
hlstriker is offline
AlMod
Member
Join Date: Nov 2006
Old 07-08-2007 , 03:34   Re: placing a model on a map
Reply With Quote #5

Oops, sorry, forgot to set the entity origin in game
AlMod is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-08-2007 , 06:40   Re: placing a model on a map
Reply With Quote #6

http://forums.alliedmods.net/showthread.php?p=162695
ConnorMcLeod is offline
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-09-2007 , 22:02   Re: placing a model on a map
Reply With Quote #7

uh,how about engine sux my nuts?
Code:
//fakemeta pwns n00bs new ent = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target")); set_pev(shot, pev_classname, "custom_class_name"); new origin[3] = {0,0,0}; //also you left out a bunch of stuff... new Float:maxs[3] = {0.2,0.2,0.5}; new Float:mins[3] = {-0.2,-0.2,-0.5}; set_pev(ent, pev_origin, origin); engfunc(EngFunc_SetSize, ent, mins, maxs); //set size set_pev(ent, pev_solid, SOLID_BBOX); //make solid set_pev(ent, pev_movetype, MOVETYPE_FLYMISSILE); //set movetype set_pev(ent, pev_framerate, 1.0); set_pev(ent, pev_rendermode, 5); set_pev(ent, pev_renderamt, 255.0); set_pev(ent, pev_scale, 1.20); engfunc(EngFunc_SetModel, ent, "models/model.mdl");
there might be some more stuff, I just typed that up from memory
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
flyeni6
Senior Member
Join Date: Jun 2006
Location: CAli
Old 07-09-2007 , 23:40   Re: placing a model on a map
Reply With Quote #8

ty
__________________

flyeni6 is offline
Send a message via AIM to flyeni6
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-10-2007 , 10:34   Re: placing a model on a map
Reply With Quote #9

um I just took some o that stuff from my AVP mod so you might have to change like the movetype and stuff, as of right now its is movetype flymissle with is used for like, well missles and stuff not an entity not moving so you might wanna change that lol.
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:45.


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