Cool Turret
#570 posted by Preach on 2018/07/21 21:02:15
Another impressive hack, well done. It's also inspired me to finish off an article I've been working on for a while. It's an ode to the oft mentioned function while hacking: SUB_CalcMoveDone
https://tomeofpreach.wordpress.com/2018/07/21/in-praise-of-sub_calcmovedone/
If you want to know the best way to make a gib fountain, or what the "Duke of York" hack is all about, come have a read...
@Preach
I am just getting started "cutting and pasting" QuakeC. I followed your recently revised tutorial on monster spawning here:
https://tomeofpreach.wordpress.com/2017/10/08/teleporting-monsters-flag/
I'd like to add a small random delay automatically to each teleporting monster as you can do in Quoth. Reason is I am using custents multiple triggers to trigger these delays spawns. As in Quoth it would be nice to have a little variation on the timing if the monsters all share a targetname.
Would this be as simple as modifying this:
self.think1();
//override the random delay some go functions apply
self.nextthink = time + 0.1;
spawn_tfog (self.origin);
spawn_tdeath(self.origin, self);
}
to this:
self.think1();
//override the random delay some go functions apply
self.nextthink = self.nextthink + random()*0.5;
spawn_tfog (self.origin);
spawn_tdeath(self.origin, self);
}
Update
I was finally able to try this last night. Does do it. Any hints would be appreciated.
Typo Above
Doesn't do it.
No Expert Here But...
#574 posted by Esrael on 2018/07/31 17:25:05
Should it be
self.nextthink = time + random()*0.5
@Esrael
I tried that as well. It's going to be a bit more complex I think.
Don't Have The Source Files On This Computer
#576 posted by Esrael on 2018/07/31 20:12:27
What values does the random function give? Anything between 0 and 1? Does the function require parameters? Like random(5) giving values between and 0 and 5?
Nevermind
#577 posted by Esrael on 2018/07/31 20:23:01
Just googled the answer myself.
QuakeC Questions
#578 posted by metlslime on 2018/07/31 20:24:35
would be better discussed in the Coding Help thread.
@metlslime
Apologies. I associate this thread with Preach and forgot it was more of a hacks thread.
#580 posted by Qmaster on 2018/07/31 21:58:35
See my suggestion in Coding Help
Very Interesting Stuff All This Is, But I Have A Question.
#581 posted by Aberrant on 2018/11/24 19:58:56
First off I mostly play a form of teamfortress, regtf, custom, and megatf. I've noticed a lot of maps use trigger_hurts to simulate mine fields and things of similar sort. I wanted real exploasion, real particles, and I used the infomation here in this to do just that. It's targetable or touchable however you need it, but it only fires once. Nothing I have done will make it work again. Is there a way to reset an info_notnull?
#582 posted by negke on 2018/11/24 20:07:59
You probably tried the barrel_explode hack which indeed only works once. The only way I could imagine for this to work without custom code is using a W_FireRocket hack that shoots a rocket right into the ground. It can the used multiple times because you can set its ammo count to a very high value. Of course there'll be the rocket launch sound, but that's probably acceptable. Read above to see how it's done.
I See, So It's Relying On The Ammo In Needs.
#583 posted by Aberrant on 2018/11/24 20:41:12
{
"classname" "info_notnull"
"use" "GrenadeExplode"
"enemy" "1"
"group_no" "1001"
"health" "1"
"targetname" "proxi1"
"nextthink" "0"
"origin" "-264 -90 -352"
}
I'll try adding this to it and see if that helps.
"no_grenades_1" "200"
thanks btw.
Well My Way Doesn't Quite Work.
#584 posted by Aberrant on 2018/11/24 20:50:34
I could perhaps use the rocket like you said, however, I was hoping more to use effects from something not a trap already. Like triggering detpacks, or airstrikes. So far the only thing that keeps firing are monster attacks. Now consider these mods are stripped down, there are no monsters so none of their effects can be used. I'm starting to think I've gone about this wrong, and theres a better hack, but I only noticed this a week ago. I am at a huge loss right now, I'm quite ignorant.
@aberrant
#585 posted by madfox on 2018/11/25 04:28:26
You should take a look at MechTech's progref.
There are several examples of what can be done within the commen progs.dat.
It's just a way of placing map entities with the right statements.
The first example is a trigger_multiple for lavaballs. I think it is easy to change it to GrenadeExplosion.
Thanks Madfox
#586 posted by Aberrant on 2018/11/25 05:37:29
I will surely look right now.
Reading, Reading And More Reading, But
#587 posted by Aberrant on 2018/11/25 21:20:06
The more I try things the better it gets, so far I have managed to find a repeating explosion. However, it always targets 0 0 0. Is there anyway I can simulate a players perspective to get a fixed point other than 0 0 0. That's what the code is calling for, someone to paint a target.
#588 posted by Qmaster on 2018/11/26 04:23:19
Which funtion name are you using? W_FireGrenade?
Not Quite
#589 posted by Aberrant on 2018/11/26 14:36:40
I know you all recommend using standard quake progs, I am using the tf mod. It's not going to be updated. I used airstrike_target. I cannot use monster skills, well there are some but limited to zombie, grunt, dog, and fish. The rest of the code was stripped down to make room for the tf classes and abilities. I'm having to go through the qc and find function names. Trial and error for me at this point.
Multiple Explosions
#590 posted by Preach on 2018/11/30 22:47:05
The difficulty with a hack that lets an entity repeatedly explode is the explosion sprite. Typically the entity that explodes gets turned into the sprite, and the last command in the sprite animation sequence is deleting yourself.
I think you could pull something off though, using SUB_CalcMoveDone as a use function to cancel the removal on the sprite just before it happens. You'd need a second field like th_pain to be setting off the explosion I guess, not tried to build all this but it sound feasible...
Dolphins
place a spawn and a scrag in the map
place the spawn somewhere else because we only want him for the precaches
give the scrag a touch key, set the value to tbaby_jump1
run up and bump into the scrag
there will be error messages, but shit is hilarious.
Works Spookily Well
#592 posted by Kinn on 2018/12/03 16:10:46
o_O
#593 posted by Qmaster on 2018/12/03 18:31:57
Dang if only I werent at work
Lightning Without Event_lightning
Hi.
I'm working on a gate where flashes should light to a central point. I've tried event_lightning with gate_logic and read everything about it. This does not seam to work because it's not continouse and also not continouse triggable.
I thought about using a lightgun to direct it to an info_null.
Has someone an idea or solution to this?
|