Archvile
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > WADs & Mods > some small ACS help needed :)
Pages (2): [1] 2 »  
Author
All times are GMT. The time now is 07:19. Post New Thread    Post A Reply
ellmo
Custom Title


Posts: 1647
Registered: 04-03


Well, I've almost finished the first episode for my "Doom: Mercenaries" Project, I'm not sure whether this is going to get any further, but I hope it will.

The point os this thread is as follows, before I'm going to upload it to /newstuff I want to implement some ACS scripting, for there is none, although it's designed or ZDoom.

I'd like to ask anyone knowing ACS language, to provide me with a single script file for map e1m1 Ultimate Doom, which will display a HUD message, let's say "HUD MESSAGE", with big white characters like the ones used in "Doom:Redemption" whenever a new map is entered. And also a glod/yellow text displayed ("TEST MESSAGE") when player crosses a specified lineDef on the map with "execute_ACS" special...

Thanks for any help.

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 10-25-03 11:42 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02


code:
setfont ("BigFont"); hudmessage (s:"test message", 0, 0, CR_GOLD, 0.5, 0.5, 3.0);

Old Post 10-25-03 15:34 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


Thanks, UD, I appreaciate, but you see, I have no idea how I'm supposed to input this string into the file. Beacuse I saw things like "script OPEN" in the ACS files or something... I dunno how the scripting begins, I suppose there are some brackets {}

Could someone prepare a demonstartion file and send it to me e-mail ? I would be very grateful.

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 10-25-03 19:52 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7736
Registered: 01-03


This is the entire script from Redemption E1M1:
code:
#include "zcommon.acs" Script 1 OPEN { SetFont("BigFont"); HudMessage(s:"Level 1: Beginning Of The End"; HUDMSG_TYPEON, 0, 9, 0.5, 0.1, 4.0, 0.03, 1.0); }
the OPEN behind the script tells the game to execute this script upon level start.
If you want to have the same script to execute by triggering a special it would be:
code:
#include "zcommon.acs" Script 1(void) { SetFont("BigFont"); HudMessage(s:"Level 1: Beginning Of The End"; HUDMSG_TYPEON, 0, 9, 0.5, 0.1, 4.0, 0.03, 1.0); }
and then use ACS_Execute(1,0,0,0,0) as the line's special.

Old Post 10-25-03 20:43 #
Graf Zahl is online now Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Darkhaven3
Junior Member


Posts: 224
Registered: 07-03


Save the damned thing as an ACS script, download XWE, then...

1.create a new entry named anything,

2.Entry->replace with the marker selected...

3.Then run the map

__________________
QUOTE OF THE...UM...WEEK :

This ticket gives me the right, no, DUTY to make a complete ass out of myself.

Old Post 10-25-03 20:48 #
Darkhaven3 is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
DooMBoy
Heh
(but Stupidity still cannot be concealed)


Posts: 8509
Registered: 12-00


It should be said that just because it's for ZDoom doesn't mean you have to have scripting of any kind in it.

__________________
Heh

Old Post 10-25-03 20:52 #
DooMBoy is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02



ellmo said:
Thanks, UD, I appreaciate, but you see, I have no idea how I'm supposed to input this string into the file. Beacuse I saw things like "script OPEN" in the ACS files or something... I dunno how the scripting begins, I suppose there are some brackets {}

Could someone prepare a demonstartion file and send it to me e-mail ? I would be very grateful.

Ahh, I didn't know you knew nothing about scripting. Ok, here's the full thing:
code:
script 1 OPEN { setfont ("BigFont"); hudmessage (s:"test message", 0, 0, CR_GOLD, 0.5, 0.5, 3.0); }
This will run on map startup, and will print the message in the centre of the screen for 3 seconds.

Old Post 10-25-03 21:02 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


Mhm, I think I got it. I tried the (void) script and it's working fine, but I still have problems with the Hud message. Think I'll have to try once more; altough I don't see any difference, ACS tells me about "missing colon" :P

Great thanks to all aof you!


DooMBoy said:
It should be said that just because it's for ZDoom doesn't mean you have to have scripting of any kind in it.
Chill out... It's time I should learn the basics anyway. And 'DooM:Mercenaries' will have just a few scrpits, and beacuse of my lack of skill, these will be on-screen informations only.

EDIT: Oh, and one more question: can I use the hudmessage script with no other parameters than the text string, and text color? Because If I leave something like that hudmessage (s:"message", CR_GOLD); i get an error.

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Last edited by ellmo on 10-25-03 at 22:10

Old Post 10-25-03 22:04 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02


Nope - all scripts (not just hudmessages) have to have the correct number of parameters (also called arguments), even if you're not using them (in which case make them 0). In the case of hudmessage, the parameters are:

code:
hudmessage (s:"test message", 0, 0, CR_GOLD, 0.5, 0.5, 3.0); Message type (0 = normal, 1 = type on, 2 = fade out) Message ID (used for special features, not needed here) Colour (gold here, can be a few others too) X-coordinate of the message on screen (0 = far left, 1 = far right) Y-coordinate of the message on screen (0 = top, 1 = bottom) Time that the message stays on screen for (secs)
If using a message type 1 or 2, these parameters are different.

Old Post 10-25-03 22:25 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


Geez, thanks UD. Now I got both those messages working fine, so there's map name and a short briefing on start (what the fuck I'm talking about? briefing must be short... brief=short)

Two more questions (I think I'll need it for further maps). If I wanted to make a dialogue between the player and a scripted marine, I guess I would have to use 'hudmessage' with different colours to indicate who's talking what. How do I make pauses between two messages? Is a command 'break;' okay? Let's say the message appears for 3.0 seconds, so can I make a break (3.5); in the same script and go on with more messages?

And Is there a simple tutorial on how to script those marines?

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 10-26-03 09:45 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02


code:
hudmessage (s:"you talk", 0, 0, CR_GREEN, 0.5, 0.5, 3.0); delay(35*3.5); hudmessage (s:"he talks", 0, 0, CR_BLUE, 0.5, 0.5, 3.0);
This will put a delay of 3.5 seconds between the two messages (script time is measured in tics - 1/35 sec - so you times it by 35 to get seconds)

Scripted marines are just monsters without weapons (unless you choose one that does have a weapon - grab up-to-date editing stuff if you haven't already got them) so you can do anything to them that you can do to a monster (activate/deactivate them, set them up on patrol routes, make them run a script when they die etc.) See the ZDoom site for editing info, tutorials and the forums (which are especially good for newer stuff).

Old Post 10-26-03 12:00 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


So If I want to make a marine help me out with the monsters, I must allow him to pickup a weapon, and script him to hate monsters, right? And If he's supposed to go somewhere, there must be a map spot, or a patrol route?

I'll experience with Marines later. Now I want to announce, that with your great help UD, I'm releasing the first episode of "DooM:Mercenaries" which has 9 maps for the Knee Deep in the Dead of the Ultimate Doom, and some simple ACS scripting along with other ZDoom features. And yes! There are nine maps, no matter what is written on the page.

Grab it here: http://doomos.webpark.pl/index.html
Oh, and don't mind the screens, they are a bit obsolete, and not very informative.

Once again Ultimate, great thanks.

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 10-26-03 16:21 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02


Scripted marines can't actually pick up weapons, but there are 2 ways to give them weapons:

1. There are 11 new scripted marines with weapons available in your editor (thing numbers 9101-9111), in addition to the weaponless one.

2. Use this special in a script, and apply it to a weaponless marine:
code:
setmarineweapon (tag, weapon)
Weapon types are: (use the name or the number)

MARINEWEAPON_Dummy 0 (no weapon)
MARINEWEAPON_Fist 1
MARINEWEAPON_BerserkFist 2
MARINEWEAPON_Chainsaw 3
MARINEWEAPON_Pistol 4
MARINEWEAPON_Shotgun 5
MARINEWEAPON_SuperShotgun 6
MARINEWEAPON_Chaingun 7
MARINEWEAPON_RocketLauncher 8
MARINEWEAPON_PlasmaRifle 9
MARINEWEAPON_Railgun 10
MARINEWEAPON_BFG 11

Old Post 10-26-03 18:23 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


LOL, I made my hero get killed in almost every available way while trying out the Railgun Scripted Marine. First, I made him just sit, wtihout a script, so he shot me on sight. Blam - ellmo's dead :)
I made a demon near him, thinking that when attacked by a demon, marine will help me in his own self-defence. I was mistaken. ellmo was again shot on sight.

Next I scripted the marine to hate the demon, so he killed it first, and then I was shot on sight LOL... Another attempt: I made the demon to hate the marine also, but the same thing happened (ellmo died). I made the Marine hate all monsters on map, and I made the script being restarted each 1 tick... Well, do you know what happens then? Guess you do, but what the hell - all monsters including the marine were travelling around the map with their speed about 10x faster, but since each frame was reset each 1/35 second, they couldn't do any harm to each other, for only one frame was displayed all the time :D

It really made me laugh. Maybe you'd like to see the effect, I could e-mail it to you UD.
Anyways, can you tell me what is supposed to be done, to make the marine rather help me, than kill me at sight?

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 10-27-03 17:57 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02


You'd have to make him hate all monsters on the map and ignore the player. (can't remember the 2nd arg number off the top of my head)

Old Post 10-27-03 18:05 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


Oh, so I was close. Do you know where can I find an index of ACS scripts? Not a tutorial, neither a demostration wad, just a plain index of options and scripts with explanations?

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 10-28-03 14:07 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7736
Registered: 01-03



ellmo said:
Oh, so I was close. Do you know where can I find an index of ACS scripts? Not a tutorial, neither a demostration wad, just a plain index of options and scripts with explanations?
There is something on ZDoom.org. UNfortunately it is not well organized because there are currently 2 lists of specials. One is rather old and the other incomplete.

Old Post 10-28-03 16:48 #
Graf Zahl is online now Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


Can you point me out what should I do to order my actors (marines and monsters used in a cutscene) follow their paths correctly?! And what is the command for adding different colours to my scripted marines. They're all balck after all...

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 10-29-03 19:59 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02


http://www.doomworld.com/vb/showthr...&threadid=18776

Old Post 10-29-03 21:39 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


Yeah, and I spet one hell of a time trying to guess what does the Translation function do.

Thanks once again UD, stay tuned, for I'll have more questions coming soon... :D

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 10-31-03 18:48 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02


Did you get the thing hating properly? If not, the correct script is:
code:
Thing_Hate (tag, 5)
5 is the one that makes him hate the tag and ignore the player. If you want him to start looking for the hated before he's woken up, use 6 instead.

Unfortunately, marines often zigzag (like monsters) and sometimes lose their way on a path, milling around for a bit before finding the path again. (it's a ZDoom bug that can't be fixed)

Old Post 10-31-03 22:28 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 3202
Registered: 07-02


er, thing_hate takes three arguments

thing_hate(hater, hated, type);

hater is who does the attacking/hunting, hated is the tid of things he hates, type describes how the hater behaves:

http://doom.vect.org:8080/acs/hate.txt

if you only pass it two args, like you described, it will use the default of 0 for the 3rd arg

if you want to make a monster totally ignore the player after he's already been woken (or in a room the player has already been in) just make him hate a non-existant tid (9999 or whatever) with hate type 5 or 6, then he'll just sit there and not care

Old Post 11-01-03 00:49 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


Now, This is what I needed. Think you've been using arg no. 5 in Helm's Deep Cyb, right?

Great thanx.

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 11-01-03 17:56 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 3202
Registered: 07-02


actually I used type 6 (for the marines), since it doesn't require los, so enemies will hunt as long as the specified tid exists on the map. for the enemies I used type 4

Old Post 11-01-03 20:34 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


ACS is fantastic, I made a small map with a grey Cyber helping you out with a pair of demons. That rocks, but unfortunately makes me think about starting another project, before I finish my actual :P

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 11-01-03 21:42 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03


Yeah, I did start a new project.

I'm going to need a hand (or a pair :P) again. First, I read in Cyb's scripting tutorial that with Actor_Property I can change monsters speed. I guess it works only with ZDoom 2.0.48; Is the same with invetory_take/give and such?

And how do I make a script being run only once. I mean there's a bllody pond in my map and there's a Baron near it. When I cross pond's edge the Baron tells me to stay away of it, but he does this again every time I cross one of the LineDefs there, things like ACS_Terminate or Suspend just don't work. Any ideas how to turn of those damn scripts after playing them once?

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 11-02-03 20:31 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
The Ultimate DooMer
(former) /newstuff Chronicler


Posts: 4701
Registered: 03-02


1. Nope, the inventory specials work in earlier versions, but not that many of them. (I think it's 2.0.43 and up but I'm not sure)

2. Put a sector round the pool (if there already isn't one), and place an 'actor enters sector' thing (with a tid) in it. Set this thing's special to run the message script, but also make the script remove the 'actor enters sector' thing (so it can't be triggered again).

Old Post 11-02-03 20:53 #
The Ultimate DooMer is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 3202
Registered: 07-02


well if you have the script being executed by a line then you can just flag the linedef to not be repeatable, I dunno what editor you're using, but I'm pretty certain in most editors it's just a checkbox that says 'repeatable'

if it's being executed by a sector action thing (actor hits floor, or actor enters sector I assume) then give the sector action thing a tid and have the first line of the script remove it with thing_remove(tid)

edit: sorry I misread your post, it seems you have every line flagged to execute the script, you can do it the way ult doomer said (though creating a new sector isn't necessary) or something like:
code:
int scr01 = 0; script 1 (void) { if(!scr01) { //do crap here scr01++; } }
OR you can set all the lines to have the same lineid and then set their special with setlinespecial() in an open/enter script and then do:
code:
script 1 (void) { setlinespecial(lineid, 0); //do stuff here }
etc, just giving you other possibilities heh

Old Post 11-02-03 20:53 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
ellmo
Custom Title


Posts: 1647
Registered: 04-03



Cyb said:
code:
int scr01 = 0; script 1 (void) { if(!scr01) { //do crap here scr01++; } }

This checks if scr01 is equal to zero, and if it is, runs the script and then increases the scr01 with one point, so it's not zero anymore, so it won't be used again, right? Hm... I'll check it, the map's worth putting some serious ACS scripting work.

About the inventory, I don't think It runs probably on my maps. It's like:

Script 1 (void)
{
Inventory_Give ("shotgun", 1);
}

right? Well it does not work mith my scripts, as well as SetMarineSprite... are you sure those quotation marks are needed?

__________________
Doomhub.com -- follow the development of a new project-cooperation platform!

Old Post 11-03-03 17:21 #
ellmo is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 3202
Registered: 07-02


inventory (and any actor class for that matter, this goes for spawning things as well) items are case sensetive, it's "Shotgun", not "shotgun"; "Revenant" not "revenant" etc etc

Old Post 11-04-03 03:31 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 07:19. Post New Thread    Post A Reply
Pages (2): [1] 2 »  
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > WADs & Mods > some small ACS help needed :)

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.