Page 1 of 1
Scripting Question
Posted: Tue Nov 07, 2006 22:40
by Zeg-Vok
Well, because Im afraid to post on the ZDoom and DW forums due to mean people, I figure that this would be the best place to ask this series of questions, ones that I've probably asked before, but cant remember.
Alright, prefferably using ACS, but fragglescript isn't excluded, how would one go about defining global variables that can be accessed by any script that needs to access it?
How would I go about adding activatable actors that would react differently depending on the tid of the activator?
Also, are there any playerclass examples out there? I've looked, but I've found nothing, the playerpawn page on the wiki is seriously lacking
Posted: Wed Nov 08, 2006 13:19
by TheDarkArchon
In ACS, you define global variables like so.
Code: Select all
global (variable type) (number): (variable name)
As for examples of classes, there aren't any comprehensive ones as far as I know. Most uses of custom classes I've seen are just basic inherits from the Doomguy.
Posted: Wed Nov 08, 2006 16:36
by Nash
You'll be pleased to know that all the player classes have already been converted to DECORATE for the current SVN version.
You should be seeing complete DECORATE definitions for the player classes in the next official release.

Posted: Wed Nov 08, 2006 16:42
by Nash
How would I go about adding activatable actors that would react differently depending on the tid of the activator?
What do you mean an "activatable" actor? If you're talking about pressing +USE while close to the actor, perhaps you'd like to check out a hacky solution I came up with over at
http://forum.zdoom.org/potato.php?t=110 ... use+actors.
Posted: Wed Nov 08, 2006 20:34
by Zeg-Vok
Alright, so to define something like red team points, it would go like
golbal (int) (0) : (redpoints) ?
Hmmm, Ill have to look at what you did Nash, I might be able to use it.
But ill elaborate a bit on what Im trying to do. Basically, I want to have 2 teams as defined with different TID's, with a generator, they have to destroy the other team's Generator while protecting their own. But I want to enable the player/s to be able to run up to certain actors and when they press use, thee will be able to spawn other actors to fight for their side. That should be doable with the whole CheckTargetInventory function in DECORATE. But I would like to get little neutral outposts that are claimable when you have enough points and press use on them. The thing is, I want to be able to have both sides able to claim the outposts, so Im wondering how I would do that feat. I was thinking about the players on each team having a different playerclass and giving the playerclasses a little inventory item just for identification purposes.
Posted: Wed Nov 08, 2006 22:12
by Graf Zahl
Nash wrote:You'll be pleased to know that all the player classes have already been converted to DECORATE for the current SVN version.
All except Strife's. That one's got a special property (unable to run below a certain health) that I'd like to generalize and export as well.
I'd also like to make the burning hands feature of him more general and usable by custom players. Right now there isn't any flexibility there.