This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Spawning models (entities)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-01-2005 , 23:38   Spawning models (entities)
Reply With Quote #1

Alright, I know almost nothing about this.. So here's my choppy code:

[EDIT] Disregard this part, continue to the next part. >>

Also what I want to know is.. How do I go by assigning a specific ID for each one of them, and removing them later on (all of them, by their ID's)?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
BioHazardousWaste
Senior Member
Join Date: Apr 2005
Location: Ontario, Canada =)
Old 05-02-2005 , 07:50  
Reply With Quote #2

um... entities? or just random models? I'm going to assume you mean entities, which I also know very little about. But I think you would do it like this.

Code:
//variables New MaxEntities = 10 New Entity[10] = 0 public SpawnEntities {      for(new i=1;i<=10;i++)      {            Entity[i] = create_entity("info_target")            //stuff to set models, make solid, hp etc etc      } } public KillEntities {      for(new i=1;1<=10;i++)      {          //you might want to add some checks          remove_entity(Entity[i])       } }

Something like that... hope it helps
__________________
"What then is truth? Truths are illusions which we have forgotten are illusions - they are metaphors that have become worn out... this (truth) is the duty to lie according to a fixed convention.

-Friedrich Nietzsche
BioHazardousWaste is offline
Send a message via MSN to BioHazardousWaste
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-02-2005 , 13:36  
Reply With Quote #3

Alright, thanks. Now, I know how to give it health, but what about checking it's health?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
LynX
Veteran Member
Join Date: Oct 2004
Old 05-02-2005 , 13:54  
Reply With Quote #4

Erm... get_pev of entity?
__________________
Current plugin : SoulPunisher anti-cheat
Percentage done : {||--------} 20%

If you think v3x is a PIMP, paste this into your sig!

If you think Bailopan is DA BOMB, paste this into your sig
LynX is offline
Send a message via ICQ to LynX
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-02-2005 , 14:00  
Reply With Quote #5

Hrm..

Code:
new health = pev(ent,pev_health)


[EDIT]
What would I use to constantly check the health?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 05-02-2005 , 17:57  
Reply With Quote #6

What do you mean "constantly" check the health?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Ced
Member
Join Date: Oct 2004
Old 05-02-2005 , 18:13  
Reply With Quote #7

I think he wants to assign a health and destroy the ent when its health is <= 0 so wants to know how to check to see if the ent needs to be removed
Ced is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-02-2005 , 18:28  
Reply With Quote #8

Well, after I shoot it a bunch of times it eventually disappears. I just want to do something WHEN it disappears. (health >= 0)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 05-02-2005 , 21:36  
Reply With Quote #9

After you create it, change its classname to something unique, and then use register_think to grab its think. Every think see if its health is <= 0, and then do something.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-02-2005 , 21:48  
Reply With Quote #10

Ah yes! So that's what that forward does.. Thanks .
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 12:57.


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