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
Scripting Question
Moderator: Graf Zahl
- Zeg-Vok
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
- Contact:
- TheDarkArchon
- Posts: 1000
- Joined: Wed Jul 06, 2005 11:58
- Location: What's that fucking smell
- Contact:
In ACS, you define global variables like so.
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.
Code: Select all
global (variable type) (number): (variable name)
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
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.How would I go about adding activatable actors that would react differently depending on the tid of the activator?
- Zeg-Vok
- Posts: 233
- Joined: Wed Sep 21, 2005 18:04
- Location: Up the creek without a paddle
- Contact:
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.
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.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
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.