Spawn/Thing_Projectile/Aimed/Gravity/2 extension.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Spawn/Thing_Projectile/Aimed/Gravity/2 extension.

by solarsnowfall » Thu Oct 26, 2006 8:30 pm

Thanks again randy!

by Nash » Thu Oct 26, 2006 8:20 pm

Thank you very much, Randy. You'll be sure that once the changes are commited, plus the new A_JumpSet function, I will be compiling the new version right away. ;)

by Theshooter7 » Thu Oct 26, 2006 7:48 pm

AWESOME! Thanks Randy! :D

by randi » Thu Oct 26, 2006 7:16 pm

Done.

by Nash » Sun Aug 20, 2006 11:05 pm

I agree that there needs to be a way to randomize spawned projectiles speeds so any special effects look better. The way things are is just so montonous.

by Theshooter7 » Sun Aug 20, 2006 8:43 pm

Well, I know. But the thing is that I do not want to write a huge code for many diffrent weapons. Unless there is someway to detemine the current weapon, or use arrays or something.

by Graf Zahl » Sun Aug 20, 2006 5:30 pm

No, it doesn't. It sounds like a bad approach to a simple problem. If you want to drop an item from DECORATE, there's a dedicated code pointer for that already.

by Theshooter7 » Sun Aug 20, 2006 5:05 pm

solarsnowfall wrote:Like the recent addition to Radius_Quake, I'd like to see Thing_Projectile and it's derivatives have the ability to treat a TID of 0 as the activator.
@Graf: I am assuming this could work with players as well. Thus, with a bit of scripting, you could easily have Thing_Projectile fire a weapon from the player's position, and then use TakeInventory() to take it from the player's inventory (duh). (For it to shoot in the right direction, GetActorAngle() would work) Thus, droppable weapons. The way I am doing it now is using Spawn() to drop the weapon, and then checking if it was successful. If so, it would remove the weapon from the player's inventory.

I hope that made a bit more sense. :?

by solarsnowfall » Sun Aug 20, 2006 4:32 pm

Graf Zahl wrote:Even on my rather fast computer it brings down the performance on Enjay's Thief level to a level I no longer consider comfortable to play.
Each one of those Thief lights had tripple the amount of projectiles being spawned than what I would consider conservative use. That may not be te best example to go by since my goal was to emulate Thief, rather than doing something very simple.

by Graf Zahl » Sun Aug 20, 2006 4:32 pm

You are making no sense at all.

by Theshooter7 » Sun Aug 20, 2006 4:27 pm

If this is added, can you say droppable weapons ;) (Though it can be done already, this would reduce the amount of work that would need to be done.)

[EDIT] Grammar.

by Graf Zahl » Sun Aug 20, 2006 4:02 pm

It isn't. But your particles are. Even on my rather fast computer it brings down the performance on Enjay's Thief level to a level I no longer consider comfortable to play.

by solarsnowfall » Sun Aug 20, 2006 4:00 pm

Ah, I hadn't thought if Thing_Projectile would be more demanding than A_CustomMissile. Damn.

Oh well. Used conservatively, some nice effects can be achieved without a lot of noticeable impact to performance. Even with the current limitations.

by Graf Zahl » Sun Aug 20, 2006 3:50 pm

... and brings down the performance even further... :(

Spawn/Thing_Projectile/Aimed/Gravity/2 extension.

by solarsnowfall » Sun Aug 20, 2006 3:43 pm

Like the recent addition to Radius_Quake, I'd like to see Thing_Projectile and it's derivatives have the ability to treat a TID of 0 as the activator. Why? Because of the greater flexibility of being able to set a dynamic speed and vspeed. I am aware of the ability to set a random pitch via A_CustomMissile, but the base speed of the projectile will always be constant. Being able to directly use Thing_Projectile (or one of it's counterparts) directly in DECORATE one could fire off projectiles with far greater trajectory varience.
Example

Code: Select all

actor W_Drop
{
  height 4
  radius 2
  mass 1
  +MISSILE
  renderstyle Translucent
  alpha 0.75
  states
  {
  Spawn:
    DROP A 1
    loop
  Death:
    DROP A 1 A_FadeOut(0.1)
    loop
  }
}

actor W_Fountain : SwitchableDecoration 20000
{
  +NOGRAVITY +NOCLIP +NOBLOCKMAP +NOSECTOR
  states
  {
  Spawn:
  Active:
    TNT1 A 0
    TNT1 A 1 SpawnProjectile(0, "W_Drop", random(0, 255), random(0, 50), random(0, 25), 1, 0)
    loop
  Inactive:
    TNT1 A 1
    loop
  }
}
Otherwise, someone has to resort to something like this.

Code: Select all

actor W_Drop1
{
  height 4
  radius 2
  mass 1
  speed 12
  +MISSILE
  renderstyle Translucent
  alpha 0.75
  states
  {
  Spawn:
    DROP A 1
    loop
  Death:
    DROP A 1 A_FadeOut(0.1)
    loop
  }
}

actor W_Drop2: W_Drop1
{
  speed 11
}

actor W_Drop3: W_Drop1
{
  speed 10
}

actor W_Drop4: W_Drop1
{
  speed 9
}

actor W_Fountain : SwitchableDecoration 20000
{
  +NOGRAVITY +NOCLIP +NOBLOCKMAP +NOSECTOR
  states
  {
  Spawn:
  Active:
    TNT1 A 0
    TNT1 A 0 A_Jump(192, 2)
    TNT1 A 1 A_CustomMissile("W_Drop1", 0, 0, random(0, 359), 2, random(65, 115)    
    loop
    TNT1 A 0 A_Jump(128, 2)
    TNT1 A 1 A_CustomMissile("W_Drop2", 0, 0, random(0, 359), 2, random(65, 115)    
    loop
    TNT1 A 0 A_Jump(128, 2)
    TNT1 A 1 A_CustomMissile("W_Drop3", 0, 0, random(0, 359), 2, random(65, 115)    
    loop
    TNT1 A 1 A_CustomMissile("W_Drop4", 0, 0, random(0, 359), 2, random(65, 115)    
    loop
  Inactive:
    TNT1 A 1
    loop
  }
}
And even then the results are less desirable. It seems to me there have been a lot of requests for custom particle fountains. I think that DECORATE is already very well set up to make these, to some extent, without some new special custom partical features. Being able to use Thing_Projectile ect like this greatly improves the appearance of such effects while reducing the amount of code needed to create it.

[edit]Argh1! Spelling...

Top