Search found 21 matches

by andreboomer
Fri Dec 09, 2022 2:01 pm
Forum: Scripting
Topic: Using CheckMove with a Dash function
Replies: 0
Views: 251

Using CheckMove with a Dash function

I'm currently using a recoil function to cause the player to dash, on certain occasions(ie, dashing into an enemy on terrain with slopes) it causes the game to freeze. Could I use CheckMove to fix this? What I currently wrote is if (!CheckMove(Pos.XY + Vel.XY)) return; but I'm not sure if this is ...
by andreboomer
Fri Sep 16, 2022 6:40 pm
Forum: Scripting
Topic: Projectile Executing Script(ACS)
Replies: 2
Views: 288

Re: Projectile Executing Script(ACS)

It works with monsters, but the projectiles itself can't call it. Yes they can: actor MyRocket : Rocket { States { Death: MISL B 8 Bright A_Explode MISL C 6 Bright ACS_NamedExecute("MyScript") MISL D 4 Bright Stop } } Note that the projectile itself is considered the activator of the script. If ...
by andreboomer
Wed Sep 14, 2022 6:31 pm
Forum: Scripting
Topic: Projectile Executing Script(ACS)
Replies: 2
Views: 288

Projectile Executing Script(ACS)

How could I make a projectile execute a script? From zscript/decorate.
So it would do ACS_NamedExecute. It works with monsters, but the projectiles itself can't call it.
by andreboomer
Wed Aug 10, 2022 12:16 pm
Forum: Scripting
Topic: Recreating ACS Vector Angle script to Zscript
Replies: 12
Views: 772

Re: Recreating ACS Vector Angle script to Zscript

m8f wrote: Wed Aug 10, 2022 9:20 am Target! The item doesn't have a target, the owner has.

try

Code: Select all

if (owner != null && owner.target != null)
{
Let TargetAngle = deltaangle(owner.angle, owner.AngleTo(owner.target));
Yea it was the pointers, thanks to everyone for the help.
by andreboomer
Wed Aug 10, 2022 9:03 am
Forum: Scripting
Topic: Recreating ACS Vector Angle script to Zscript
Replies: 12
Views: 772

Re: Recreating ACS Vector Angle script to Zscript

I'm trying to explain to you about null pointers and you're still going on about checking actor properties without even checking if they exist first. Well - I did what I could to help you, I even provided you with some code. It's all in your hands, now. Oh my bad for not clarifying, I did null ...
by andreboomer
Tue Aug 09, 2022 10:30 pm
Forum: Scripting
Topic: Recreating ACS Vector Angle script to Zscript
Replies: 12
Views: 772

Re: Recreating ACS Vector Angle script to Zscript

The error pops up with the game running as: VM execution aborted:tried to read from address zero. In function parameter targ the next line saying where it's called from which is line : 495 Do make sure also to check the nullptrs for both owner and target - ZScript will not check them for you and ...
by andreboomer
Tue Aug 09, 2022 6:09 pm
Forum: Scripting
Topic: Recreating ACS Vector Angle script to Zscript
Replies: 12
Views: 772

Re: Recreating ACS Vector Angle script to Zscript

but this line crashes the game. I'm stumped honestly. It crashes how? You got to be a bit more informative here if you need help. Ok so this is basically what I wrote Line495: Let TargetAngle = deltaangle(owner.angle, owner.AngleTo(target)); Let angle = (TargetAngle - owner.angle + 1.0) % 1.0; Then ...
by andreboomer
Mon Aug 08, 2022 8:29 pm
Forum: Scripting
Topic: Recreating ACS Vector Angle script to Zscript
Replies: 12
Views: 772

Re: Recreating ACS Vector Angle script to Zscript

There is a function for the Actor class: clearscope double AngleTo(Actor target, bool absolute = false) const Isn't it what you want? this is what I came up with(not a coder by trade, so I'm probably way off) vang = deltaangle(owner.angle, AngleTo(target)); but this line crashes the game. I'm ...
by andreboomer
Mon Aug 08, 2022 8:11 pm
Forum: Scripting
Topic: Recreating ACS Vector Angle script to Zscript
Replies: 12
Views: 772

Recreating ACS Vector Angle script to Zscript

I'm using the link below: https://zdoom.org/wiki/VectorAngle I want to recreate the ACS script used in the example above, but in zscript. So Specifically I'm not relying on a TID but a pointer to the nearest actor/target. For example with the line: vang = VectorAngle (GetActorX (1) - GetActorX (0 ...
by andreboomer
Wed May 11, 2022 1:13 pm
Forum: Scripting
Topic: Customizing Radius Thrust
Replies: 0
Views: 162

Customizing Radius Thrust

I want to use Radius thrust, but only within a set cone in front of the player. How would I achieve this? Or would a completely different function be more useful to do this?
by andreboomer
Wed Apr 06, 2022 4:32 pm
Forum: Scripting
Topic: Causing pain state to master
Replies: 2
Views: 297

Re: Causing pain state to master

Gonna try it out, thanks.
by andreboomer
Wed Apr 06, 2022 3:17 pm
Forum: Scripting
Topic: Causing pain state to master
Replies: 2
Views: 297

Causing pain state to master

To my knowledge there isn't a decorate function that allows you to cause a master to go into a pain state. With zscript and pointers it may be possible. How could I go about doing this?
by andreboomer
Sun Mar 27, 2022 12:34 pm
Forum: Scripting
Topic: Terminology used within LineAttack
Replies: 2
Views: 340

Re: Terminology used within LineAttack

Ok I wish there were further explanations of each parameter. Like what would linetarget do?
Ok that makes sense, I mostly read through the actual pk3.
How do I do a search up the functions? I've used github to read up on scripting, but I'm not that familiar with it.
Thanks for the response.
by andreboomer
Wed Mar 23, 2022 6:39 pm
Forum: Scripting
Topic: Terminology used within LineAttack
Replies: 2
Views: 340

Terminology used within LineAttack

I have read the Line Attack page on the wiki, there are three things I'd like to understand, 1. FTranslatedLineTarget t; I believe this is an integer, reference or a pointer representing the target or the victim of the attack? Not sure. 2. AimLineAttack(ang, 64, null, 0., ALF_CHECK3D); This seems to ...
by andreboomer
Thu Mar 10, 2022 12:57 pm
Forum: Mapping
Topic: "Player" control during cutscenes.
Replies: 3
Views: 456

Re: "Player" control during cutscenes.

You can always move the player by manually setting the position or adding some velocity. The direction can be calculated by simple vector maths from the current position towards the next patrol point. Could you elaborate more on this? And are there articles that explain this? Also, how would I ...

Go to advanced search