VavoomC/Progs scripting questions

Talk about editing and creation of Vavoom mods

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 02 Mar 2011 16:10

Overriding Pickup sounds like a reasonably easy way to go.

Code: Select all
native final void BounceWall(float overbounce, float bouncefactor);


I understand what the second parameter is, but what is the first one ? I would like to make
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Crimson Wizard » 02 Mar 2011 16:44

b0rsuk wrote:The function is native so I can't look inside it.

You can, if you download engine sources :)

Can't help regarding
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 03 Mar 2011 18:28

Why can't I just do

Code: Select all
AmmoUse1 = 10


, put it in a custom DECORATE method and execute it on spawn or pickup ? I get "illegal identifier AmmoUse1" error. I also tried "Weapon.AmmoUse1 = 10".
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Firebrand » 03 Mar 2011 20:01

Where are you adding this new method to call?
User avatar
Firebrand
 
Posts: 1000
Joined: 11 Feb 2004 08:12
Location: Mexico

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 04 Mar 2011 06:50

Firebrand wrote:Where are you adding this new method to call?


actors/hexen/fighterhammer.txt
actor FWeaphammer

[code]
22 Ready:
23 FHMR A 1 A_WeaponReady
24 FHMR A 0 A_SetAmmoUse
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Firebrand » 04 Mar 2011 16:29

You need to do it with something like this in the A_SetAmmoUse method (in progs):
Code: Select all
if (!bIsPlayer)
   {
      return;
   }
   Weapon Wpn = PlayerEx(Player).ReadyWeapon;

        Wpn.AmmoUse1 = 10;

I would recommend that you ta
User avatar
Firebrand
 
Posts: 1000
Joined: 11 Feb 2004 08:12
Location: Mexico

Re: VavoomC/Progs scripting questions

Postby BlackJar72 » 04 Mar 2011 19:23

I have questions about "special" data fields too: (1) are they automatically made part of any monster (or other object) that uses a method they appear in? (2) Is there a way (other than an init function called at spawn) that they can be given d
BlackJar72
 
Posts: 21
Joined: 09 Feb 2008 09:25

Re: VavoomC/Progs scripting questions

Postby BlackJar72 » 04 Mar 2011 19:24

I have questions about "special" data fields too: (1) are they automatically made part of any monster (or other object) that uses a method they appear in? (2) Is there a way (other than an init function called at spawn) that they can be given d
BlackJar72
 
Posts: 21
Joined: 09 Feb 2008 09:25

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 04 Mar 2011 19:41

BlackJar72 wrote:I have questions about "special" data fields too: (1) are they automatically made part of any monster (or other object) that uses a method they appear in? (2) Is there a way (other than an init function ca
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Crimson Wizard » 05 Mar 2011 06:40

BlackJar72 wrote:(1) are they automatically made part of any monster (or other object) that uses a method they appear in?

Variables that are declared in class are made a part of any object of that class (type). [b:2k
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 07 Mar 2011 16:29

Okay, thanks to your help, Firebrand, I managed to make Hammer of Retribution use 25 mana (8 shots instead of 5) on lowest skill level. Now what may be a math question:

[code]
95 if (CanSee(link))
96 {
97 float angl
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Firebrand » 07 Mar 2011 19:13

The 256 division is to adjust the giant values to something more of an angle, if you make the calculations, it will give you the angles that are being considered on that check.

As for the colon, it means that you are using a value that is defined inside
User avatar
Firebrand
 
Posts: 1000
Joined: 11 Feb 2004 08:12
Location: Mexico

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 11 Mar 2011 07:22

How can I check an actor's name or class name ? For example when a projectile hits an Ettin, I want to print "Ettin".
User avatar
b0rsuk
 
Posts: 189
Joined: 10 May 2010 15:55

Re: VavoomC/Progs scripting questions

Postby Crimson Wizard » 11 Mar 2011 08:53

b0rsuk wrote:How can I check an actor's name or class name ? For example when a projectile hits an Ettin, I want to print "Ettin".

Simple enough,
Code: Select all
GetClassName(A.Class)

Y
Crimson Wizard
 
Posts: 881
Joined: 09 Nov 2005 14:21
Location: St. Petersburg, Russia

Re: VavoomC/Progs scripting questions

Postby b0rsuk » 11 Mar 2011 10:40

Okay, that worked, but I've learned the hard way that I need to print "%n" and not "%s".

I'm trying to debug WraithVerge. I want ghosts not to target idle monsters. So in CHolyFindTarget I compare:

[code]
if (link.State
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 0 guests

cron