Raised This Month: $ Target: $400
 0% 

creating fire


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Speed!
BANNED
Join Date: Jan 2009
Old 01-31-2009 , 13:59   creating fire
Reply With Quote #1

hi, i wanna create fire on the ground. i know how to get coord and all that stuff, but dunno how to create fire like the HL one, and being damaged if being near it
i think its an entity that may be also created by VHE but dunno
Speed! is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 01-31-2009 , 14:03   Re: creating fire
Reply With Quote #2

You have to use a Sprite... And then You can check players origins and burn Players.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Speed!
BANNED
Join Date: Jan 2009
Old 01-31-2009 , 14:10   Re: creating fire
Reply With Quote #3

Quote:
Originally Posted by AntiBots View Post
You have to use a Sprite... And then You can check players origins and burn Players.
but how can i use sprites accuaretly?
because it look shitty what i did LOL
im not used to manage with sprites
i'd need some help
edit: for burning players should i use prethink or w00t?

Last edited by Speed!; 01-31-2009 at 14:13.
Speed! is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-31-2009 , 14:53   Re: creating fire
Reply With Quote #4

Quote:
Originally Posted by Speed! View Post
but how can i use sprites accuaretly?
because it look shitty what i did LOL
im not used to manage with sprites
So are u suposing that we are starting to code sprite plugin here? The forums are full of sprites, just find one simple and start with it. Then when u get stuck/need help -> post here with the code.
SnoW is offline
Send a message via MSN to SnoW
Speed!
BANNED
Join Date: Jan 2009
Old 01-31-2009 , 15:06   Re: creating fire
Reply With Quote #5

Quote:
Originally Posted by SnoW View Post
So are u suposing that we are starting to code sprite plugin here? The forums are full of sprites, just find one simple and start with it. Then when u get stuck/need help -> post here with the code.
nope
but i want to know how to give the style of HL i mean, sprites are used to follow you (i mean the angle) but i want to superpose them
Speed! is offline
Dr.G
Senior Member
Join Date: Nov 2008
Old 01-31-2009 , 16:28   Re: creating fire
Reply With Quote #6

Hey check this molotov cocktail plugin out http://forums.alliedmods.net/showthr...hlight=molotov


PHP Code:
stock random_fire(Origin[3], ent) {
 new 
range get_pcvar_num(pMlRadius);
 new 
iOrigin[3];
 for (new 
1<= 5i++) {
  
g_g 1;
  
iOrigin[0] = Origin[0] + random_num(-rangerange);
  
iOrigin[1] = Origin[1] + random_num(-rangerange);
  
iOrigin[2] = Origin[2];
  
iOrigin[2] = ground_z(iOriginent);
  while (
get_distance(iOriginOrigin) > range) {
   
g_g++;
 
   
iOrigin[0] = Origin[0] + random_num(-rangerange);
   
iOrigin[1] = Origin[1] + random_num(-rangerange);
   
iOrigin[2] = Origin[2];
   if (
g_g >= ANTI_LAGG) {
    
iOrigin[2] = ground_z(iOriginent1);
   } else {
    
iOrigin[2] = ground_z(iOriginent);
   }
  }
  new 
rand random_num(515);
  
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
  
write_byte(TE_SPRITE);
  
write_coord(iOrigin[0]);
  
write_coord(iOrigin[1]);
  
write_coord(iOrigin[2] + rand 5);
  
write_short(firespr);
  
write_byte(rand);
  
write_byte(100);
  
message_end();
  if (!(
4)) { // Smoke every 4th flame
   
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
   
write_byte(TE_SMOKE);
   
write_coord(iOrigin[0]);
   
write_coord(iOrigin[1]);
   
write_coord(iOrigin[2] + 120);
   
write_short(smokespr[random_num(01)]);
   
write_byte(random_num(1030));
   
write_byte(random_num(1020));
   
message_end();
  }
 }

__________________
Dr.G is offline
Speed!
BANNED
Join Date: Jan 2009
Old 01-31-2009 , 21:57   Re: creating fire
Reply With Quote #7

Quote:
Originally Posted by Dr.G View Post
Hey check this molotov cocktail plugin out http://forums.alliedmods.net/showthr...hlight=molotov


PHP Code:
stock random_fire(Origin[3], ent) {
 new 
range get_pcvar_num(pMlRadius);
 new 
iOrigin[3];
 for (new 
1<= 5i++) {
  
g_g 1;
  
iOrigin[0] = Origin[0] + random_num(-rangerange);
  
iOrigin[1] = Origin[1] + random_num(-rangerange);
  
iOrigin[2] = Origin[2];
  
iOrigin[2] = ground_z(iOriginent);
  while (
get_distance(iOriginOrigin) > range) {
   
g_g++;
 
   
iOrigin[0] = Origin[0] + random_num(-rangerange);
   
iOrigin[1] = Origin[1] + random_num(-rangerange);
   
iOrigin[2] = Origin[2];
   if (
g_g >= ANTI_LAGG) {
    
iOrigin[2] = ground_z(iOriginent1);
   } else {
    
iOrigin[2] = ground_z(iOriginent);
   }
  }
  new 
rand random_num(515);
  
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
  
write_byte(TE_SPRITE);
  
write_coord(iOrigin[0]);
  
write_coord(iOrigin[1]);
  
write_coord(iOrigin[2] + rand 5);
  
write_short(firespr);
  
write_byte(rand);
  
write_byte(100);
  
message_end();
  if (!(
4)) { // Smoke every 4th flame
   
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
   
write_byte(TE_SMOKE);
   
write_coord(iOrigin[0]);
   
write_coord(iOrigin[1]);
   
write_coord(iOrigin[2] + 120);
   
write_short(smokespr[random_num(01)]);
   
write_byte(random_num(1030));
   
write_byte(random_num(1020));
   
message_end();
  }
 }

thanks u very much
+karma
Speed! is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 01-31-2009 , 23:24   Re: creating fire
Reply With Quote #8

There is TE_FIREFIELD
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Speed!
BANNED
Join Date: Jan 2009
Old 02-01-2009 , 00:19   Re: creating fire
Reply With Quote #9

Quote:
Originally Posted by Drak View Post
There is TE_FIREFIELD
yes! , i thought there were something of that
will take a look

EDIT: having some troubles with that

Quote:
#define TE_FIREFIELD 123 // makes a field of fire.
// coord (origin)
// short (radius) (fire is made in a square around origin. -radius, -radius to radius, radius)
// short (modelindex)
// byte (count)
// byte (flags)
// byte (duration (in seconds) * 10) (will be randomized a bit)
//
// to keep network traffic low, this message has associated flags that fit into a byte:
#define TEFIRE_FLAG_ALLFLOAT 1 // all sprites will drift upwards as they animate
#define TEFIRE_FLAG_SOMEFLOAT 2 // some of the sprites will drift upwards. (50% chance)
#define TEFIRE_FLAG_LOOP 4 // if set, sprite plays at 15 fps, otherwise plays at whatever rate stretches the animation over the sprite's duration.
#define TEFIRE_FLAG_ALPHA 8 // if set, sprite is rendered alpha blended at 50% else, opaque
#define TEFIRE_FLAG_PLANAR 16 // if set, all fire sprites have same initial Z instead of randomly filling a cube.
what should be in "model index" :S?

Last edited by Speed!; 02-01-2009 at 00:22.
Speed! is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 02-01-2009 , 00:42   Re: creating fire
Reply With Quote #10

Code:
new fire public plugin_precache()      fire = precache_model("sprites/fire.spr");
Use 'fire' as your model index.
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Reply


Thread Tools
Display Modes

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 01:43.


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