Ability to change any actor property via ACS

Moderator: GZDoom Developers

Post Reply
User avatar
sirjuddington
Posts: 1030
Joined: Wed Jul 16, 2003 4:47 am
Location: Australia
Contact:

Ability to change any actor property via ACS

Post by sirjuddington »

So I'm working on some kind of RPG system, and I have a basic fireball. I want different aspects of it to be seperately upgradable (damage, radius damage, speed, etc). Of course to do this at the moment AFAIK all that can be done is to create hundreds of subclasses of it, with each different damage/speed/radiusdamage combination, which would be a huge mess :P

So I was thinking it'd be really nice to be able to do something like this in an ACS script:

Code: Select all

ChangeActorProperty("FireBall", "Damage", 10)
Would this be possible at all? Or if not is there any other way to do something like this?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

ACS really isn't the way to achieve this. It'd need lots and lots of coding to get everything in. Internally properties are not names but simple member variables (some not even that) so you'd have to explicitly code support for every single property.

Sorry, but that's really not worth it.
User avatar
sirjuddington
Posts: 1030
Joined: Wed Jul 16, 2003 4:47 am
Location: Australia
Contact:

Post by sirjuddington »

Hmm, well is there any other way to do something similar?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Not yet. I think this is a good place to say 'Wait for Doomscript'.

Or do what you already said: Create a shitload of different projectiles.
User avatar
sirjuddington
Posts: 1030
Joined: Wed Jul 16, 2003 4:47 am
Location: Australia
Contact:

Post by sirjuddington »

Heh, actually I planned to do this RPG back in 2000 or so, but gave up and thought "I'll wait for doomscript" :P Looks like I'll have to wait a bit longer then ;)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

I'd do Doomscript myself if I knew how to work with the tools required to implement this. But somehow I can't get into Bison... :(
User avatar
Bio Hazard
Posts: 4019
Joined: Fri Aug 15, 2003 8:15 pm
Location: ferret ~/C/ZDL $
Contact:

Post by Bio Hazard »

Code: Select all

biohazard@rabbit ~ $ bison -V
 bison (GNU Bison) 2.1
 Written by Robert Corbett and Richard Stallman.

 Copyright (C) 2005 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR  PURPOSE.
biohazard@rabbit ~ $
Huh, works for me.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

I really don't know whether I should say :laff: or :? ...
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Post by Zippy »

Dealing with Lex and YACC was the most awful experience I've ever had in any programming course. I'm not sure I ever want to deal with anything like that again.
User avatar
sirjuddington
Posts: 1030
Joined: Wed Jul 16, 2003 4:47 am
Location: Australia
Contact:

Post by sirjuddington »

Well I've figured out a way to change the damage on the fly at least using SetActorProperty. Unfortunately changing APROP_Speed doesn't seem to work though. So I think I might change this request to add more APROP_* values to Set/GetActorProperty :P Probably the only other one I need myself is RadiusDamageFactor, but there are a few others that may be useful too.
User avatar
Sir_Alien
Posts: 863
Joined: Sun Aug 29, 2004 6:15 am
Location: Sydney, Australia
Contact:

Post by Sir_Alien »

I had the same problem once; IIRC, you actually need to change APROP_SPEED relative to the actor's current specified speed...

In other words, you'd need to use something like:

SetActorProperty(TID, APROP_SPEED, (GetActorProperty(TID, APROP_SPEED) * MULTIPLIER));

[EDIT]Yeah, it's on the wiki, bottom of the page.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

The speed property doesn't alter the actual momentum itself. For that you need ThrustThing.
User avatar
Sir_Alien
Posts: 863
Joined: Sun Aug 29, 2004 6:15 am
Location: Sydney, Australia
Contact:

Post by Sir_Alien »

Yeah, I should probably pay more attention to what's going on in a thread...
User avatar
sirjuddington
Posts: 1030
Joined: Wed Jul 16, 2003 4:47 am
Location: Australia
Contact:

Post by sirjuddington »

Heh ok, so it looks like I can't really change the speed then :/ Also how about allowing ACS_ExecuteWithResult to be used as a parameter of action functions (A_Explode in particular)?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”