Hello everyone.
This is a problem that may have a difficult solution. Or that possibly does not have solution.
I am creating a new heresiarch with new sprites, and I want to imitate the action of the mana cubes that are on top of the heresiarch.
My problem is that I do not know how to make the cubes begin to accelerate the speed of rotation when the heresiarch enters its attack state.
I'm only interested in getting them to do their movement action when the monster attacks.
This is what I have tried:
var int user_count;
States
{
Spawn:
NSRC A 3
NSRC A 2 A_SpawnItemEx("CubeBase1", 28, 0, 110, 0, 0, 0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER)
Idle:
NSRC AB 10 A_Look
Loop
See:
NSRC ABCD 5 A_Chase
Loop
Missile:
TNT1 A 0 A_giveinventory("ForCube", 1, AAPTR_TRACER)
NSRC EFEFEFEFEFEFEFEFEFEFEFEFEFE 4 A_FaceTarget // 27
NSRC G 4
NSRC H 70
Goto See
Attack1:
NSRC G 6
NSRC H 6
NSRC H 5 A_FaceTarget
Goto Attack1+2
Attack2:
NSRC G 6
NSRC H 6
Goto See
Pain:
NSRC I 8
NSRC I 8 A_Pain
Goto See
Death:
NSRD A 5 A_KillChildren(0, KILS_FOILINVUL | KILS_KILLMISSILES)
NSRD B 5 A_FaceTarget
NSRD C 5 A_Scream
NSRD DEFGHIJKLM 5
NSRD N 5 A_NoBlocking
NSRD OPQR 5
NSRD S -1
Stop
}
}
ACTOR CubeBase1
{
Speed 10
Radius 5
Height 5
PROJECTILE
-ACTIVATEIMPACT
-ACTIVATEPCROSS
+FULLVOLDEATH
+CANBOUNCEWATER
+NOWALLBOUNCESND
var int user_angle;
var int user_count;
States
{
Spawn:
// SBMP ABCDEFGHIJKLMNOP 2 Bright
// TNT1 A 0 A_TakeInventory("ForCube", 1, AAPTR_MASTER)
See:
// TNT1 A 2
TNT1 A 0 A_JumpIfInventory("ForCube", 1, "Point")
// SBMP ABCDEFGHIJKLMNOP 2 Bright
TNT1 A 0 A_TakeInventory("ForCube", 1, AAPTR_MASTER)
// TNT1 A 0 A_giveinventory("ForCube", 1, AAPTR_MASTER)
SBMP A 2 Bright
{
A_Warp(AAPTR_MASTER, 28, 0, 110, user_angle, WARPF_ABSOLUTEANGLE | WARPF_NOCHECKPOSITION | WARPF_INTERPOLATE);
A_SetUserVar("user_angle", user_angle+8);
If(user_count > 0)
{
A_SetUserVar("user_angle", user_angle+20);
If(user_count > 80)
{
A_SetUserVar("user_angle", user_angle+6);
If(user_count > 120)
{
A_SetUserVar("user_angle", user_angle-24);
If(user_count > 200)
{
A_SetUserVar("user_count", user_count-200);
}
}
}
}
Else
{
A_JumpIfInventory("ForCube", 1, AAPTR_DEFAULT);
}
}
Loop
Point:
TNT1 A 0 A_SetUserVar("user_count", user_count+1)
Goto See
Actor ForCube : Inventory
{
Inventory.MaxAmount 1
}
Thanks
problem with heresiarch mana cubes
Moderator: GZDoom Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
- Posts: 1
- Joined: Tue Jun 12, 2018 1:35 pm
- Location: Spain