Unexpected '{' in definition of Doubletap SOLVED

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

Unexpected '{' in definition of Doubletap SOLVED

#1

Post by Fabysk » Thu Jan 09, 2014 7:35 pm

So I want to implement a powerup which increases the rate of fire of the players weapon for P115, but I get this error

Code: Select all

ACTOR Doubletap : PowerupGiver
{
	Game Doom
	Inventory.MaxAmount 1
	powerup.type PowerDoubleFiringSpeed
	+INVENTORY.AUTOACTIVATE
	+COUNTITEM
  {
   Spawn:
     STIM A -1
     Stop
  } 
}
Last edited by Fabysk on Fri Jan 10, 2014 5:47 am, edited 1 time in total.
Image Image Image

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Unexpected '{' in definition of Doubletap

#2

Post by Ijon Tichy » Thu Jan 09, 2014 7:40 pm

you forgot "States"

also powerdoublefiringspeed isn't a thing in 1.2

you'd probably be better off coding the increased fire rate yourself

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: Unexpected '{' in definition of Doubletap

#3

Post by Fabysk » Thu Jan 09, 2014 7:46 pm

Ijon Tichy wrote: you forgot "States"
I swear, I always forget about states :v:
Ijon Tichy wrote: also powerdoublefiringspeed isn't a thing in 1.2

you'd probably be better off coding the increased fire rate yourself
Alright then, I'll try to code that. I am probably gonna need some help since this is my fist time actually coding something like this (still a beginner in DECORATE).
Image Image Image

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Unexpected '{' in definition of Doubletap

#4

Post by Ijon Tichy » Thu Jan 09, 2014 9:01 pm

well, are you willing to wait a little while for z& 2.0 to release? if so, then it's a non-issue

if not, then basically all you'd need to do is, in the weapons in your mod, have a A_JumpIfInventory check for whatever you want to use to double firing speed, and jump to a fire state with the tic rates halved

it allows greater flexibility, but if you don't care about that, I'd advise just waiting

edit: one post, "you might want to code it yourself"; next post, "eh, just wait"

aren't I just fucking consistent
Last edited by Ijon Tichy on Thu Jan 09, 2014 9:02 pm, edited 1 time in total.

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: Unexpected '{' in definition of Doubletap

#5

Post by Fabysk » Fri Jan 10, 2014 2:02 am

Ijon Tichy wrote: well, are you willing to wait a little while for z& 2.0 to release?
For sure, I can wait. Supposing it will be available in the next update, but I shouldn't get my hopes up...
Image Image Image

Ijon Tichy
Frequent Poster Miles card holder
Posts: 901
Joined: Mon Jun 04, 2012 5:07 am

RE: Unexpected '{' in definition of Doubletap

#6

Post by Ijon Tichy » Fri Jan 10, 2014 3:22 am

it's already been added to 2.0, according to this, so there ya go

User avatar
Fabysk
Forum Regular
Posts: 469
Joined: Sat Sep 22, 2012 8:17 pm
Location: In a house...duhh

RE: Unexpected '{' in definition of Doubletap

#7

Post by Fabysk » Fri Jan 10, 2014 5:46 am

Oh, I can wait for that. Might as well consider this thread as "solved" then
Image Image Image

Post Reply