Can projectiles not have acs commands in decorate?

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
Dancso
Posts: 1906
Joined: Wed Oct 11, 2006 10:39 am
Location: at home.. Status: lazy like hell

Can projectiles not have acs commands in decorate?

Post by Dancso »

Hi,

I'm trying to add an action special to a projectile, which is "Thing_SetTranslation" I want to use it like so it gets the colors from the actor that shoots it.

Here is the code for it: (this is the original plasmaball, just replaced the original, and added the translation line.)

Code: Select all

ACTOR PlasmaBall1 replaces PlasmaBall
{
	Radius 13
	Height 8
	Speed 25
	Damage 5
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	SeeSound "weapons/plasmaf"
	DeathSound "weapons/plasmax"
	Obituary "$OB_MPPLASMARIFLE"
	States
	{
	Spawn:
		PLSS A 0 Thing_SetTranslation(0,-1);
		PLSS AB 6 Bright
		Loop
	Death:
		PLSE ABCDE 4 Bright
		Stop
	}
}
If i'm right, that would immadiatly translate the plasmaball's color to the shooter's colors, BUT I'm getting the error "sprite names must be exactly 4 characters" The line with this translation thingy gives the error for sure, cause' if i qoute it out, it works.

I've also tried to make it PLSS AB and also PLSS A 1 but i got the same error.

I may be dumb, but as far as i know, i can put these kind of commands in decorate, no?

Any ideas how i could get around this?
User avatar
Ghastly
... in rememberance ...
Posts: 6109
Joined: Fri Jul 06, 2007 2:34 pm

Post by Ghastly »

Get rid of the ; at the end. If that doesn't work then Thing_SetTranslation doesn't work with Decorate.
User avatar
Dancso
Posts: 1906
Joined: Wed Oct 11, 2006 10:39 am
Location: at home.. Status: lazy like hell

Post by Dancso »

Oops? lol forgot i dont have to put ; after commands in decorate. Sorry for this thread.

Actually, i just also realised that this method wouldnt work, it would give the reverse that i wanted -- i wanted to color the plasmaball to color what the marine has, but this could do the opposite, or even nothing.

But anyways, i'm going to try and get around this with another method.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

[wiki]Thing_SetTranslation[/wiki] definitely works in Decorate, as do all [wiki]action specials[/wiki].

[wiki]Built-in ACS functions[/wiki] do not.
User avatar
Dancso
Posts: 1906
Joined: Wed Oct 11, 2006 10:39 am
Location: at home.. Status: lazy like hell

Post by Dancso »

I feel i'm very close to making this work, although i ecountered a problem again. :?

I tought of... what if i recreate the translations, so i dont use 4, just 2, 1 for the green translation, and one for the blue one (plasmagun shots.)

Now, i've made the plasmaball actor has this line:

Code: Select all

PLSS A 0 Thing_SetTranslation(0,2)
So this would mean, it should set the second translation on itself, right? now i've put this line into an ENTER script:

Code: Select all

CreateTranslation(2,192:207=176:191);
Which would automatically declare the second translation, when the player enters the map. I've put it into an ENTER script, to make it red by default.

But, this wont work, and i wonder: why? :shock:
User avatar
farhaven
Posts: 82
Joined: Sun Feb 25, 2007 2:01 pm
Location: NRW, Germany

Post by farhaven »

the reason for this is probably the way objects "enter" the game. AFAIK, first,all objects as set up in the editor are placed on maps,then players enter,which triggers ENTER scripts. Changing the script type to OPEN should solve the problem.

Edit: I just re-read your post and noticed I didn't do that carefully enough in the first place as I just read that the translated objects are spawned mid-game. Anyhow, give my solution a try, maybe it works.
User avatar
Dancso
Posts: 1906
Joined: Wed Oct 11, 2006 10:39 am
Location: at home.. Status: lazy like hell

Post by Dancso »

Nope, didnt work, i've had the translation for the marines created by that script too, so if it worked for them, it shouldnt be a problem for this one. (I gave it a try, though.)
Locked

Return to “Editing (Archive)”