Back to the Vavoom Forum Archives


Forum

Some questions about Vavoom C

Tue, 05 Sep 2006 18:08:16

TheCount

Hello. First of all, congratulations to the creator of Vavoom for such a great work <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> I have some questions about Vavoom C. First of all, is it documented? I mean, is there a reference for it somewhere? Then, I'm trying to make a new projectile in Hexen with graphics (I think) haven't been used in the whole game. The thing is, I want the projectile to spawn fireballs in random directions when it hits. For that, I have based the missile in the code of the "IceGuyMissile", but I have a problem. This is the code:
void A_FlareMissileExplode()
{
	Actor mo;
	int i;

	for (i = 0; i < 12; i++)
	{
		mo = SpawnMissileAngle(FireBall1, itof(i) * 30.0, -0.9 * 35.0);
		if (mo)
		{
			mo.Instigator = Instigator;
		}
	}
}
And I don't understand half of it. I only replaced the shards with fireballs, and twisted the (I think) angle numbers a little. Now, how do I spawn projectiles with gravity? I want the explosion to create an effect like this one I programmed in ACS, but with less fireballs and speed:
int flares;
script 1 ( void )
{
	flares=0;
	while (flares !=70)
	{
		Thing_ProjectileGravity(71, T_FIREBALL1, random(0,255), random(1,120), random(10,60));
		flares = flares+1;
	}
}
Is it possible to do something similar with Vavoom C? If it is, how to? Thank you very much.
Tue, 05 Sep 2006 19:16:46

Crimson Wizard

Try this one:
void A_FlareMissileExplode() 
{ 
   Actor mo; 
   int i; 

   for (i = 0; i < 12; i++) 
   { 
      mo = SpawnMissileAngle(FireBall1, itof(i) * 30.0, -0.9 * 35.0); 
      if (mo) 
      { 
         mo.bNoGravity = false;
         mo.Instigator = Instigator; 
      } 
   } 
}
Tue, 05 Sep 2006 19:19:19

Crimson Wizard

You may laso change Fireball's mass: mo.Mass = X.X;
Wed, 06 Sep 2006 11:51:26

Janis Legzdinsh

There is some documentation on Vavoom wiki, but it's very incomplete.
Wed, 06 Sep 2006 13:43:00

Crimson Wizard

...just reminded me... <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> Maybe I'll write a couple of articles about most used classes like Thinker-Entity-Actor and Player. I suddenly got a question: where Thinker objects are stored?
Wed, 06 Sep 2006 16:20:57

Janis Legzdinsh

They are stored in a linked list in Level class.
Fri, 22 Sep 2006 06:20:38

Crimson Wizard

What is new BeginPlay event in Entity class, I mean when it is called?
Fri, 22 Sep 2006 12:01:31

Janis Legzdinsh

For map placed objects it's called immediately after map has been loaded. For objects created later it's called when it's spawned.
Sat, 23 Sep 2006 22:22:15

Crimson Wizard

How may I safely respawn player? I tried SpawnClient and DeathMatchSpawn but in both cases previous player's MO stayed on map.
Sun, 24 Sep 2006 07:48:25

Janis Legzdinsh

Remove the old object first. Or take a look how morphing/unmorphing works.
Tue, 26 Sep 2006 10:48:03

Crimson Wizard

It was said somewhere (in wiki maybe) that you cannot use "classid Class" variable of class Object. It was true for version 1.18. Is it true for now as well?
Tue, 26 Sep 2006 13:36:04

Firebrand

I'm not sure, but I think it doesn't works with the current version.
Tue, 26 Sep 2006 17:45:21

Janis Legzdinsh

You can use it.
Tue, 26 Sep 2006 19:12:37

Crimson Wizard

That's what is written in WIKI (date is january 2005):
classid: Represents a class. The actual value is a reference to an object describing class, but currently you can't use it as a Class object.
So, you say now it can be used as Class object (object of class Class?) Honestly, I do not understand this quite enouph. Until now I knew that classid variables may be used to define spawned object type and in conditions like "if (var.Class == Pawn)"... But how it may be used as Class object?
Wed, 27 Sep 2006 16:31:31

Janis Legzdinsh

Initially class Class was derived from Object and could be used as such, but it's not anymore. Probably that sentence should be removed.
Wed, 27 Sep 2006 16:35:08

Crimson Wizard

So, classid is simply class ID and no more?
Thu, 28 Sep 2006 16:24:08

Janis Legzdinsh

Yes.

Back to the Vavoom Forum Archives