[Addressed] Add translation parameter to all spawning functions

Moderator: GZDoom Developers

Postby Bio Hazard » Thu Nov 02, 2006 1:03 am

You should just need to type
Code: Select allExpand view
svn diff
and it would spit out a patch. I don't know about TSVN though.
User avatar
Bio Hazard
Lord of the Lord of Nitpicking.
 
Joined: 15 Aug 2003
Location: ferret ~/C/ZDL $

Postby Nash » Thu Nov 02, 2006 11:19 am

I generated that patch using TortoiseSVN by right-clicking and "create patch".
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Nash » Wed Nov 22, 2006 4:02 pm

To developers:

I don't mean to sound annoying or anything but I was wondering what you think about this little feature. Any particular reason this isn't implemented yet?

I mean, I'll understand if it's because I'm still a programming n00b and basically a nobody when it comes to ZDoom development or anything but I thought it was a simple yet useful change that would take a couple of seconds at most to implement.

I'm already using it a lot for special effects in my WADs but I don't really like the fact that I have to stick to a custom EXE for this. I'm sure other modders will find it useful too at one point or another.

After reviewing the initial feature suggestion, I have concluded that the only practical function that needs a translation transfer parameter is A_CustomMissile. So it's pretty much done.

Or maybe you have other plans on how to go about this? A_SpawnItem with an initial horizontal speed? Ability to use an expression for the actor's starting spawn angle? If those two will be implemented, then I guess this modification can be scrapped then.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Cutmanmike » Thu Nov 23, 2006 10:41 am

Is this the thing which will make my custom gore "remember" what colour blood the monster has?
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

Postby Nash » Fri Nov 24, 2006 7:18 pm

If you are going to spawn your custom gore sprites using A_CustomMissile, then yes.

Officially, A_SpawnItem and A_SpawnDebris has a translation parameter, but I wanted the blood sprites to fly out. A_SpawnDebris could have been the solution but I wasn't quite happy with the A_SpawnDebris' movement code.

I thought A_CustomMissile would be better since you can put expressions into it and stuff.

It was a simple change to add a translation parameter to A_CustomMissile.
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Graf Zahl » Sun Nov 26, 2006 12:01 pm

I just added a more generic A_SpawnItemEx function which should take care of all your needs.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Nash » Sun Nov 26, 2006 8:21 pm

Thank you very much Graf.

If anything, this was a coding lesson for me. ;)

EDIT: Whoa, the new function has 9 parameters. o_O How do I use the other parameters?
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

Postby Graf Zahl » Mon Nov 27, 2006 2:18 am

A_SpawnItemEx(classname, xpos, ypos, zpos, xspeed, yspeed, zspeed, angle, flags)

Both position and speed can be expressed relative to the spawned actor's angle or in global map units.

High flexibility requires a lot of information. You can see what the flags mean by looking at the source. This will be documented when it's officially released.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Electronic Samurai » Mon Nov 27, 2006 3:25 am

Neat!

Thanks much, Graf.
User avatar
Electronic Samurai
 
Joined: 27 Mar 2006
Location: Wandering the open plains

Postby HotWax » Mon Nov 27, 2006 8:35 am

Holy..... That's awesome! Thanks, Graf!
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Cutmanmike » Mon Nov 27, 2006 9:06 am

Graf Zahl wrote:A_SpawnItemEx(classname, xpos, ypos, zpos, xspeed, yspeed, zspeed, angle, flags)


Hmm, is the x y z position from the actor that spawns the "item"? Also how would xyz speed work?

Oh yeah, wait for the docs :)
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

Postby HotWax » Mon Nov 27, 2006 9:20 am

Graf Zahl wrote:Both position and speed can be expressed relative to the spawned actor's angle or in global map units.
User avatar
HotWax
Do what you must, and pay the price later.
 
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Cutmanmike » Mon Nov 27, 2006 9:24 am

Oh neat.
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

Postby Graf Zahl » Mon Nov 27, 2006 9:30 am

Coordinates are always offsets from the spawning actor. There are 2 modes for both speed and position: relative and absolute.

Relative means that the spawn position and movement direction depends on the spawned actor's angle.
Absolute means the values are differences in absolute map coordinates (e.g. a positive x-value always means 'east'.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby Cutmanmike » Mon Nov 27, 2006 9:32 am

So how do you define which uses relative and absolute?
User avatar
Cutmanmike
Is it hot in here or is it just ZScript
 
Joined: 06 Oct 2003
Location: United Kingdom
Discord: https://discord.gg/Whts7Bj
Operating System: Windows Vista/7/2008 64-bit

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests