A Liilte Scripting Help Please

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
mac53
Posts: 251
Joined: Sun Dec 17, 2006 11:15 am
Location: Delmarva Peninsula, MD USA
Contact:

A Liilte Scripting Help Please

Post by mac53 »

I need a liitle help with a scripting command...
---------------------------------------------------------------
Thing_ProjectileAimed (1,51,300,5,0);
delay (const: 20);
restart;
---------------------------------------------------------------

This works fine, but when the monster is dead, the defense set-up
continues to fire. I've tried to look through the wiki, but unfortunately
I didn't find what I need to stop the shooting after the death of the
last monster. Would someone please either help me with this or show me
where to find it?

Thanks folks.... :?



mac
Last edited by mac53 on Wed Jan 17, 2007 9:05 am, edited 1 time in total.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

In your editor give the monster the action special ACS_Terminate(script ,0). Replace script with the script number you want to stop.
User avatar
mac53
Posts: 251
Joined: Sun Dec 17, 2006 11:15 am
Location: Delmarva Peninsula, MD USA
Contact:

Post by mac53 »

Actually, it's not my editor that's giving this action...

I'm handwriting these myself, and there is no link to this through my editor. I'm using DeePsea in the Zdoom/Hexen format.
Last edited by mac53 on Wed Jan 17, 2007 12:18 pm, edited 2 times in total.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Most things in ACS usually are. :)
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Haha very funny.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

I said most things. The types of convoluted ideas you come up with are usually much more difficult (but usually really fun!) to code in ACS. :P
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

HotWax wrote:I said most things. The types of convoluted ideas you come up with are usually much more difficult (but usually really fun!) to code in ACS. :P
... That is the first time i've ever heard "fun" and "ACS" in the same sentance.
Actually, it's now my editor that's giving this action...

I'm handwriting these myself, and there is no link to this through my editor. I'm using DeePsea in the Zdoom/Hexen format.
I don't understand what you mean sir.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

mac53 wrote:Actually, it's now my editor that's giving this action...

I'm handwriting these myself, and there is no link to this through my editor. I'm using DeePsea in the Zdoom/Hexen format.
OK, while I applaud your efforts at reducing posts by editing an existing post, this is usually reserved for the last post in the thread, to avoid double-posting. It's really not necessary for you to edit a post that is 4 posts back when you want to reply to a post lower in the thread.

Also, by removing the original content of the reply you may it really hard for other people to follow the conversation.

Also, use DoomBuilder. DeepSea is outdated and (more importantly) made by a fartbag.
User avatar
mac53
Posts: 251
Joined: Sun Dec 17, 2006 11:15 am
Location: Delmarva Peninsula, MD USA
Contact:

Post by mac53 »

OK, while I applaud your efforts at reducing posts by editing an existing post, this is usually reserved for the last post in the thread, to avoid double-posting. It's really not necessary for you to edit a post that is 4 posts back when you want to reply to a post lower in the thread.

Also, by removing the original content of the reply you may it really hard for other people to follow the conversation.

Also, use DoomBuilder. DeepSea is outdated and (more importantly) made by a fartbag.
First, when I edited the one post, I did almost right away and not four posts later! And yes, when I do that I do try saving space and thank you
for your applaud.

I hear you about DoomBuilder... It's just that it's unfortunate that I paid
this [fartbag] to register it. When I was first getting started, it was the administrator @ Doom Wad Station that recommended DeePsea over DoomBuilder, so I took his advise. And I now happen to agree with the 90% of the Doom mapping community, that DoomBuilder is probably better that DeePsea. It's just that I paid for it and I see no possible way of getting my money back! I will say that DeePsea has its own ACS compiler though where DoomBuilder doesn't, kinda makes things a little easier for me being I'm in the learning stages of mapping.

I want to be a considered a friend here... not an adversary. ;)

I truely do need the help of the forum's members to help me with the closing commands of this particular script.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

DoomBuilder has a built-in script editor and automatically runs ACC to do the compiling. No, the compiler's not built-in, but I don't see how DeepSea's could be either without being horribly outdated from all the changes that have been made to ACC over the years.

In order to terminate a script when an enemy dies, you go into the enemy's properties and set their special to 82 ([wiki]ACS_Terminate[/wiki]). Then set their first argument (arg1) to be the number of the script to terminate. That's all you need to do, and no further scripting is involved. Note that this won't work if the script in question was started using [wiki]ACS_ExecuteAlways[/wiki].

If you want the script to terminate when a number of enemies are killed, then you're going to need some additional scripting.
User avatar
mac53
Posts: 251
Joined: Sun Dec 17, 2006 11:15 am
Location: Delmarva Peninsula, MD USA
Contact:

Post by mac53 »

I got-cha buddy... and thank you...

I'm going to see what I can do to get DoomBuilder to take over the rest of my map construction and DeePsea and ki$$ my @ss!
User avatar
mac53
Posts: 251
Joined: Sun Dec 17, 2006 11:15 am
Location: Delmarva Peninsula, MD USA
Contact:

Post by mac53 »

Hotwax...

I followed your instructions with going into the "things" properties and selection 82 Acs_Terminate, set the attributes, Script # and map # as instructed by the map author...
It didn't work... Is there a way that I can write it in as text in the .acs file instead of using the editor? And if so, is it done within the same script or do I need to write a new one?
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Make sure the map number is 0, which means teh current map. DB should have a compiler built in.
User avatar
Isle
Posts: 687
Joined: Fri Nov 21, 2003 1:30 am
Location: Arizona, USA

Post by Isle »

geeze you people have some ugly answers.

use

Code: Select all

while(getactorproperty(5, APROP_Health) > 0)
{
    Thing_ProjectileAimed (1,51,300,5,0); 
    delay (const: 20);
}
and take out the restart. you wont have to mess with giving the monster a special
User avatar
mac53
Posts: 251
Joined: Sun Dec 17, 2006 11:15 am
Location: Delmarva Peninsula, MD USA
Contact:

Post by mac53 »

ha ha... :lol:

Thank you Isle... Does this go into the same script or is it a new entry?
Sorry for the stupid questions!
Locked

Return to “Editing (Archive)”