If kitevo (power in Hungarian) is 1, the result will be second power of the given number.
Code: Select all
int eredmeny = FixedMul(alap, alap);2 the 3., 3 the 4. etc..
You can solve this problem with an extra if condition in the function.
Code: Select all
int eredmeny = FixedMul(alap, alap);Code: Select all
ACTOR NewWeapon replaces Chainsaw
{
[Your code goes here]
}
ACTOR NewWeapon2 : WeaponGiver replaces Supershotgun
{
DropItem "NewWeapon"
States
{
Spawn:
GUN1 A -1
stop
}
}
I'm not getting it to work. I have both zombies set as tag "4" and the sector to open as a door is "5". Then, this is my script for my level:cocka wrote:It depends. Basically there are two ways to do that.how do I make it so that both have to die for the event to unfold?
1. Assign the same tid for each of the monsters and an event (a script).
Example:
2. Assign the same tid for each of the monsters, BUT now place a line or a "thing executed special" next to the place where you have the monsters and invoke the event with that line/object.Code: Select all
if(!ThingCount(T_NONE, <yourmonsters' tid>)) { // something will happen }
Example:OR you can also useCode: Select all
until(!ThingCount(T_NONE, <yourmonsters' tid>)) { delay(3); } // then do something else. That's all.Code: Select all
while(ThingCount(T_NONE, <yourmonsters' tid>))
The second option is archiproof therefore it's better when there might be some resurrected monsters.
Code: Select all
#include "zcommon.acs"
script 1 ENTER
{
Scroll_Floor (2, 0, -20, 2);
}
script 2 ENTER
{
if(!ThingCount(T_NONE, 4))
{
Door_Open(5,50);
}
}
Yes, you are.Am I failing at coding correctly?
Code: Select all
script 2 ENTERCan you elaborate on what you mean by that?cocka wrote:Yes, you are.Am I failing at coding correctly?
Why do you want to start the script right at the loading of the map?! You have to assign an event (ACS_Execute) to the tagged monsters.Code: Select all
script 2 ENTER
Use script 2 (void) or (int tid, int tag) instead and make sure you have set the script for the tagged monsters.
Not the player but the monster has to be the activator!
Your script can be interpreted like this:
Right at the beginning of the map let's count how many monsters there are with tag 4. Well, you'll get a number greater than 0. So your if condition will be false and nothing will happen.
Code: Select all
actor holywater
{
+FORCEXYBILLBOARD
-nogravity
+LOOKALLAROUND
+RIPPER
-Randomize
Radius 11
Height 8
Speed 15
Scale 1
Damage (2)
Gravity 2.00
Projectile
states
{
spawn:
HPP4 A 1
loop
death:
TNT1 A 0 a_playsound ("subweapons/holywaterhit")
HFIR A 3 bright A_Explode(70,120,120)
HFIR B 3 bright A_Explode(70,120,120)
HFIR C 3 bright A_Explode(70,120,120)
HFIR D 3 bright A_Explode(70,120,120)
HFIR C 3 bright A_Explode(70,120,120)
HFIR B 3 bright A_Explode(70,120,120)
HFIR A 3 bright A_Explode(70,120,120)
stop
Crash:
TNT1 A 0 a_playsound ("subweapons/holywaterhit")
HFIR A 3 bright A_Explode(70,120,120)
HFIR B 3 bright A_Explode(70,120,120)
HFIR C 3 bright A_Explode(70,120,120)
HFIR D 3 bright A_Explode(70,120,120)
HFIR C 3 bright A_Explode(70,120,120)
HFIR B 3 bright A_Explode(70,120,120)
HFIR A 3 bright A_Explode(70,120,120)
stop
xdeath:
TNT1 A 0 a_playsound ("subweapons/holywaterhit")
HFIR A 3 bright A_Explode(70,120,120)
HFIR B 3 bright A_Explode(70,120,120)
HFIR C 3 bright A_Explode(70,120,120)
HFIR D 3 bright A_Explode(70,120,120)
HFIR C 3 bright A_Explode(70,120,120)
HFIR B 3 bright A_Explode(70,120,120)
HFIR A 3 bright A_Explode(70,120,120)
stop
}
}
Put the Projectile combo before the flags.xenoxols wrote:No matter what I do, I cant seem to get this projectile to drop.
Code: Select all
-NOGRAVITY
+NOGRAVITYCode: Select all
actor holywater
{
Projectile
+FORCEXYBILLBOARD
-nogravity
+LOOKALLAROUND
+RIPPER
-Randomize
-Solid
Radius 11
Height 8
Speed 12
Scale 1
Damage (6)
Gravity 0.80
states
{
spawn:
HPP4 A 1
loop
death:
TNT1 A 0 a_playsound ("subweapons/holywaterhit")
HFIR A 3 bright A_Explode(20,120,120)
HFIR B 3 bright A_Explode(10,120,120)
HFIR C 3 bright A_Explode(20,120,120)
HFIR D 3 bright A_Explode(10,120,120)
HFIR C 3 bright A_Explode(20,120,120)
HFIR B 3 bright A_Explode(10,120,120)
HFIR A 3 bright A_Explode(20,120,120)
stop
Crash:
TNT1 A 0 a_playsound ("subweapons/holywaterhit")
HFIR A 3 bright A_Explode(20,120,120)
HFIR B 3 bright A_Explode(10,120,120)
HFIR C 3 bright A_Explode(20,120,120)
HFIR D 3 bright A_Explode(10,120,120)
HFIR C 3 bright A_Explode(20,120,120)
HFIR B 3 bright A_Explode(10,120,120)
HFIR A 3 bright A_Explode(20,120,120)
stop
xdeath:
TNT1 A 0 a_playsound ("subweapons/holywaterhit")
HFIR A 3 bright A_Explode(20,120,120)
HFIR B 3 bright A_Explode(10,120,120)
HFIR C 3 bright A_Explode(20,120,120)
HFIR D 3 bright A_Explode(10,120,120)
HFIR C 3 bright A_Explode(20,120,120)
HFIR B 3 bright A_Explode(10,120,120)
HFIR A 3 bright A_Explode(20,120,120)
stop
}
}Code: Select all
A_Explode (20, 120, XF_HURTSOURCE|XF_NOTMISSILE)[wiki]A_Warp[/wiki]xenoxols wrote:How could I make A projectile that circles around the player?
Code: Select all
vhnd e 0 a_firecustommissile("FrostShot1",-2,0,4,5,0,3)
vhnd e 0 a_firecustommissile("FrostShot1",-3,0,-4,5,0,3)
vhnd e 0 a_firecustommissile("FrostShot1",0,1)
vhnd e 0 a_firecustommissile("FrostShot1",3,0,-4,-5,0,3)
vhnd e 0 a_firecustommissile("FrostShot1",2,0,4,-5,0,3)Code: Select all
ACTOR NewPlasmaRifle : PlasmaRifle
{
Weapon.SlotNumber 6
States
{
Fire:
TNT1 A 0 A_GunFlash
PLSG A 0 A_FireCustomMissile("PlasmaBall", 20, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 40, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 60, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 80, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 100, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 120, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 140, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 160, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 180, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 200, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 220, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 240, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 260, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 280, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 300, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 320, FALSE)
PLSG A 0 A_FireCustomMissile("PlasmaBall", 340, FALSE)
PLSG A 3 A_FireCustomMissile("PlasmaBall")
PLSG B 20 A_ReFire
Goto Ready
}
}