Titlepic Intro project
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!)
- LastManonEarth
- Posts: 44
- Joined: Mon Apr 25, 2016 4:25 pm
Re: Titlepic Intro project
Thanks, I realized that when I manually run the titlemap from the console and proceeding with just a noise alerting the bastard. Then he started to move. However I see some issues like for some reason he has difficulty to fire me, not sure if for the restricted place or whatever. Also, the scale down fact is making him firing a rocket from a wrong place. WIll try with your code you provided and will report back.
- LastManonEarth
- Posts: 44
- Joined: Mon Apr 25, 2016 4:25 pm
Re: Titlepic Intro project
Amazing! Just what I itended. Some steps, then fire. Will need just bright and proper scale to fit screen, wich I will try to add know. I will also try to add the Reactiontime to the code so cyberdemon will fadeout/disappear like with the weapon , after 500 tics, at the same time background leds to credits. Intention here is not to kill/destroy the enemy. just a preview. A cast call for the level 30 is also intended, to show all the PB monsters , mod I use to play with.
*** I was able to provide bright and scale it. However I will have to realize how to pick the correct PB cyermdemon and how to scale the x, y were he fires too. The cyberdemon you picked up is firing properly as seems is the vanilla one, and scaled down will fire scaled too. Very neat.
Need to also check the fade out thing first. Will try reaction time.
*** I was able to provide bright and scale it. However I will have to realize how to pick the correct PB cyermdemon and how to scale the x, y were he fires too. The cyberdemon you picked up is firing properly as seems is the vanilla one, and scaled down will fire scaled too. Very neat.
Need to also check the fade out thing first. Will try reaction time.
- Void Weaver
- Posts: 724
- Joined: Thu Dec 18, 2014 7:15 am
- Contact:
Re: Titlepic Intro project
Good luck, but don't forget that Cyber's full "see" cycle takes 24 tics (8 frames each for 3 tics), so ReactionTime value for disappering after 500 tics should be 500/24~=21.
EDIT:
BUT! ReactionTime+A_Countdown doesn't count duration difference between "See" and "Missile" states...
Sooo, I guess there should be better to use token counter methods, via A_GiveInventory and A_JumpIfInventory.
EDIT:
BUT! ReactionTime+A_Countdown doesn't count duration difference between "See" and "Missile" states...
Sooo, I guess there should be better to use token counter methods, via A_GiveInventory and A_JumpIfInventory.
Last edited by Void Weaver on Fri Jun 28, 2019 12:28 pm, edited 2 times in total.
- LastManonEarth
- Posts: 44
- Joined: Mon Apr 25, 2016 4:25 pm
Re: Titlepic Intro project
Thx. will let you know later. You have provided good weapons now 

- LastManonEarth
- Posts: 44
- Joined: Mon Apr 25, 2016 4:25 pm
Re: Titlepic Intro project
Void Weaver wrote:Good luck, but don't forget that Cyber's full "see" cycle takes 24 tics (8 frames each for 3 tics), so ReactionTime value for disappering after 500 tics should be 500/24~=21.
EDIT:
BUT! ReactionTime+A_Countdown doesn't count duration difference between "See" and "Missile" states...
Sooo, I guess there should be better to use token counter methods, via A_GiveInventory and A_JumpIfInventory.
I was going to try when I read your edit. So reaction time seems will not work here. Ok will check how to use a token method. That`s alomost what I need to make complete the secuence and start adding all the weapons and monsters to be randomly selected and to loop. Shame.
Also please consider the fadeout/disappear is not based on the cyberdemon (or monster) cycle. It`s based on rigid time provided for you to read the stats/profile. We do not need to wait him to fire or complete his own secuence, I only want to make sure he randomnly walks and fires WHILE the background assigned to him shows.
Intention was to use reaction time like this:
Code: Select all
ACTOR TheCyberdemon_CC2
{
ReactionTime 500
{
+BRIGHT
Health 1
Scale 0.5
DeathSound "cyber/death"
ActiveSound "cyber/active"
var int user_cooldown;
States
{
Spawn:
TNT1 A 0 NoDelay A_PlaySound("cyber/sight",0)
TNT1 A 0 A_Countdown
See:
CYBR A 3 A_PlaySound("cyber/hoof")
CYBR ABBCC 3
CYBR D 3 A_PlaySound("spider/walk")
CYBR D 0
{
For(user_cooldown==0; user_cooldown<3; user_cooldown++)
{
A_Jump(256,"See");
}
}
CYBR D 0 A_SetUserVar(user_cooldown,0)
CYBR D 3 A_Jump(64,"Missile") //25% chance
Loop
Missile:
CYBR E 6
CYBR F 12 A_PlaySound("weapons/rocklf")
CYBR E 12
CYBR F 12 A_PlaySound("weapons/rocklf")
CYBR E 12
CYBR F 12 A_PlaySound("weapons/rocklf")
Goto See
/*
Death: //In case if you have handler for toggle death animation
CYBR H 10
CYBR I 10 A_Scream
CYBR JKLMNO 10
CYBR P 30
Stop
*/
}
}
}
- Void Weaver
- Posts: 724
- Joined: Thu Dec 18, 2014 7:15 am
- Contact:
Re: Titlepic Intro project
Actually it works, but never returns precise actor's lifespan duration. But in your code it never will work anyway.LastManonEarth wrote:I was going to try when I read your edit. So reaction time seems will not work here.
You totally messed up with mechanics of ReactionTime+A_Countdown, it doesn't work this way. Look:LastManonEarth wrote:Intention was to use reaction time like this:
Code: Select all
ACTOR TheCyberdemon_CC2
{
+BRIGHT
Health 1
Scale 0.5
DeathSound "cyber/death"
ActiveSound "cyber/active"
var int user_cooldown;
ReactionTime 500 //With conjuction with A_Countdown that value defines how much times A_Countdown can be called without jump to caller-actor's Death state, so
States
{
Spawn:
TNT1 A 0 NoDelay A_PlaySound("cyber/sight",0)
//TNT1 A 0 A_Countdown /*Wrong place, since:
a) here is no non-zero duration frames and
b) here isn't actual "working" state, actual actions goes in "See" (and "Missile") state wchich lays below
*/
See:
CYBR A 3 A_PlaySound("cyber/hoof")
CYBR ABBCC 3
CYBR D 3 A_PlaySound("spider/walk")
CYBR D 3
{
For(user_cooldown==0; user_cooldown<3; user_cooldown++)
{
A_Jump(256,"See");
}
}
TNT1 A 0 0 A_SetUserVar(user_cooldown,0)
TNT1 A 0 A_Countdown //COUNTDOWN SHOULD BE HERE...
TNT1 A 0 A_Jump(64,"Missile") //25% chance to play attack animation
Loop //Whole "See" cycle takes 3*8 tics (24 total), so ReactionTime 500 would keep actor's presence for 500*24 = 12000 tics (~=5 min)!!!
Missile:
CYBR E 6
CYBR F 12 A_PlaySound("weapons/rocklf")
CYBR E 12
CYBR F 12 A_PlaySound("weapons/rocklf")
CYBR E 12
CYBR F 12 A_PlaySound("weapons/rocklf")
TNT1 A 0 A_Countdown //... AND OPTIONALLY HERE
Goto See
/*
Death: //In case if you have handler for toggle death animation
CYBR H 10
CYBR I 10 A_Scream
CYBR JKLMNO 10
CYBR P 30
Stop
*/
}
}
Then you don't need any timer mechanics at all. You should use a some script or a some uservar\inv. check instead for such goal. I guess.Also please consider the fadeout/disappear is not based on the cyberdemon (or monster) cycle. It`s based on rigid time provided for you to read the stats/profile. We do not need to wait him to fire or complete his own secuence, I only want to make sure he randomnly walks and fires WHILE the background assigned to him shows.
Last edited by Void Weaver on Fri Jun 28, 2019 1:21 pm, edited 1 time in total.
- LastManonEarth
- Posts: 44
- Joined: Mon Apr 25, 2016 4:25 pm
Re: Titlepic Intro project
So, seems itwill be only able to "count time" only in the missile and see states. Got confused cos the weapon section has only one state. Then I understood it should also be included in the spawn one. Lot of things to learn still. But glad I am doing. I really appreciate you for being so dedicated and assist in my knowledge, as you also took time to explain the why.
- Void Weaver
- Posts: 724
- Joined: Thu Dec 18, 2014 7:15 am
- Contact:
Re: Titlepic Intro project
No. RTime+A_Countdown successfully work with non-missile actors too, and not only in "See" state, but because the "See" state is a solely state for regular missile, in which it is exist alive there.LastManonEarth wrote:So, seems itwill be only able to "count time" only in the missile and see states. Got confused cos the weapon section has only one state. Then I understood it should also be included in the spawn one. Lot of things to learn still. But glad I am doing. I really appreciate you for being so condered and assist in my knowledge, as you also took time to explain the why.
Wiki a bit incorrect for A_Countdown article. :\
- LastManonEarth
- Posts: 44
- Joined: Mon Apr 25, 2016 4:25 pm
Re: Titlepic Intro project
Totally lost on how to create that script. Only comes to my mind now is to create some conditional so when the background is changed, then the monster removed. However, do not see this possible. Thanks for the effort in this, this is the latest step, if I am able to remove the monster, then I will be able to finish the intro in order to loop.
Hopefully someone reads this and assists while I try to solve the puzzle.
Hopefully someone reads this and assists while I try to solve the puzzle.
- LastManonEarth
- Posts: 44
- Joined: Mon Apr 25, 2016 4:25 pm
Re: Titlepic Intro project
I had to live with the reaction time and countdown tools. Most of the times the Death is happening at the same time background fades out. Not the most perfect thing but that`s the only thing I have as of today. If anyone wants to contribute, it`s very welcomed.