VavoomC/Progs scripting questions

Talk about editing and creation of Vavoom mods

Re: VavoomC/Progs scripting questions

Postby Crimson Wizard » 11 Mar 2011 12:52

Ah, I remember I had similar problem.
IIRC, such properties as IdleState refer to exactly the FIRST FRAME of the state animation. Thus, if an actor is at different frame, the equation won't work.
I think you should use either StateIsInRange or StateIsInSe
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 11 Mar 2011 13:55

Crimson Wizard wrote:Ah, I remember I had similar problem.
IIRC, such properties as IdleState refer to exactly the FIRST FRAME of the state animation. Thus, if an actor is at different frame, the equation won't work.
I think you shou
Last edited by b0rsuk on 11 Mar 2011 14:12, edited 1 time in total.
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Crimson Wizard » 11 Mar 2011 14:11

That's because you make a mistake there:

Code: Select all
 if (StateIsInSequence(Other.State, IdleState)){
49         return true;
50         }


Here you compare the Other's State with the Missile's IdleState.
You should perhaps make:
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 11 Mar 2011 14:31

Yesss !! That's it ! Thank you. My ghosts now behave much better, even though they can fly through walls they won't disturb idle creatures. It was very annoying in vanilla hexen, and is even more annoying in a mod where Wraithverge doesn't kill.
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Crimson Wizard » 11 Mar 2011 14:34

Glad I could help :)
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 11 Mar 2011 17:48

A question about native methods.

A) sometimes a method used in DECORATE is defined in a progs file, and then listed in actors/nativeclasses.txt
B) sometimes a method used in DECORATE is called native in a decorate file, for examp
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Crimson Wizard » 11 Mar 2011 18:28

b0rsuk wrote:When should A be used, and when B ? So far I've only been using the way "A" - I add my methods in linespec/Actor.B0rsuk.vc . But I'm starting to think maybe if I use the method only in one decorate file I shou
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 12 Mar 2011 07:25

I'm trying to utilize the bFullBright flag to make mage's Arc of Death flicker randomly. The actual weapon, not the missile. I started by erasing most of "Bright" words from actors/hexen/magelightning.txt . So far as expected, the weapon is no l
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 12 Mar 2011 10:27

Another question. I want my centaurs to have much longer melee attack range. How do I do that ? Here's what doesn't work:

- editing EntityEx.Head and just changing MELEERANGE constant. Player attacks change their range (undesirable!), but ettins and cent
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Crimson Wizard » 12 Mar 2011 15:08

First of all, you SHOULDN'T change anything in Engine folder. These files contain only declarations, but actual implementation is in Vavoom engine. That's why functions there have a "native" type. If you change any class there engine will detect
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 12 Mar 2011 17:03

Crimson Wizard wrote:You can change it the way there won't be any need to fix its call all over the progs. There's a way to make parameter be optional, like this:


I know, I already tried doing it this way ! But ev
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Crimson Wizard » 12 Mar 2011 17:12

No, sorry, it was me who made a mistake.
Actually, you should make something like this:
[code]
bool CheckMeleeRange( optional float range )
{
if (!specified_range)
{
if (Class = Centaur):
range = 2 * MELEERANGE;
el
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 12 Mar 2011 17:38

I've already made it work in a similar way, simply

Code: Select all
if (IsA('Centaur'))


And it works. I've seen the !specified_variablename trick before, and couldn't find a variable with a name like that. You mean I can use it with wit
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 12 Mar 2011 17:53

Wait a second - I don't have to do this ! There's already a "MeleeRange" actor property !! And the CheckMeleeRange method uses the property, not MELEERANGE constant.

But another question arises. In linespec/EntityEx.Head.vc , MELEERANGE constan
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 14 Mar 2011 14:18

Code: Select all
1333             A = Spawn(class<EntityEx>(SInfo->ChunkClass), org);


This line from progs/linespec/EntityEx.Physics.vc generates a chunk corresponding to surface type when a projectile hits floor. For example if
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

PreviousNext

Return to Editing

Who is online

Users browsing this forum: No registered users and 1 guest

cron