• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Special Effect Roll] How do I alter the roll for the SFX using Chopinski's Missile System?

Status
Not open for further replies.
Level 9
Joined
Sep 16, 2016
Messages
248
JASS:
            set missile = Slash.create(x, y, z, tx, ty, tz)
            set missile.source = u
            set missile.model = "BladeBeamFinalLarger.mdx"
            set missile.speed = 2500
            set missile.damage = 100
            set missile.collision = 275
            set missile.owner = GetOwningPlayer(u)
            set missile.scale = 2.5
            call missile.color(255, 0, 35)
            call missile.launch()

I know roll is in radians, but I can't seem to change the roll for the missile. I tried using the Blz native, but it expects an "effect" but the missile here is not of type "effect" so I couldn't find a way to use it like that
 
JASS:
            set missile = Slash.create(x, y, z, tx, ty, tz)
            set missile.source = u
            set missile.model = "BladeBeamFinalLarger.mdx"
            set missile.speed = 2500
            set missile.damage = 100
            set missile.collision = 275
            set missile.owner = GetOwningPlayer(u)
            set missile.scale = 2.5
            call missile.color(255, 0, 35)
            call missile.launch()

I know roll is in radians, but I can't seem to change the roll for the missile. I tried using the Blz native, but it expects an "effect" but the missile here is not of type "effect" so I couldn't find a way to use it like that
I'm no expert on the Jass version but I would check/do the following:
1) Check if the model of the special effect can actually support the orientations you want. I know certain models won't play nice.
2) Create an onPeriod function which does the following:
vJASS:
set missile.roll = GetRandomReal(0.0, 2.0)
set missile.pitch = GetRandomReal(0.0, 2.0)
set missile.yaw = GetRandomReal(0.0, 2.0)
Surely there are examples and API for this on the thread / demo map.
 
Last edited:
I'm no expert on the Jass version but I would check/do the following:
1) The model of the special effect can actually support the orientations you want. I know certain models won't play nice.
2) Create an onPeriod function which does the following:
vJASS:
set missile.roll = GetRandomReal(0.0, 2.0)
set missile.pitch = GetRandomReal(0.0, 2.0)
set missile.yaw = GetRandomReal(0.0, 2.0)
Surely there are examples and API for this on the thread / demo map.

Thanks Uncle I love you, I will go ahead and try it right away and see how it will go, and report back
 
I'm no expert on the Jass version but I would check/do the following:
1) Check if the model of the special effect can actually support the orientations you want. I know certain models won't play nice.
2) Create an onPeriod function which does the following:
vJASS:
set missile.roll = GetRandomReal(0.0, 2.0)
set missile.pitch = GetRandomReal(0.0, 2.0)
set missile.yaw = GetRandomReal(0.0, 2.0)
Surely there are examples and API for this on the thread / demo map.

I got an error

JASS:
        static method onPeriod takes nothing returns nothing
            
            set missile.roll = GetRandomReal(0.0, 2.0)
            set missile.pitch = GetRandomReal(0.0, 2.0)
            set missile.yaw = GetRandomReal(0.0, 2.0)
        endmethod

"pitch is not a member of Missiles___MissileEvents". But yaw says the same and for roll its "can't convert real to boolean". I tried doing this instead:

JASS:
        static method onPeriod takes nothing returns nothing
            
            set missile.effect.roll = GetRandomReal(0.0, 2.0)
            set missile.effect.pitch = GetRandomReal(0.0, 2.0)
            set missile.effect.yaw = GetRandomReal(0.0, 2.0)
        endmethod

But the effect was completely unchanged
 
.roll is a boolean value, not a real. .pitch and .yaw do not exist as struct members of a Missile. From the documentation:
roll -> If true, the missile will roll as well (1.31+ only) (read and write)
//...
curve -> The curve of the missile (read and write)
arc -> The Arc of the missile (read and write)
I am not familiar with Relativistic Missiles, but as I understand you are supposed to set .curve and .arc which will determine the missile's orientation throughout its trajectory. There is no way to set p/r/y specifically because the system determines what those should be at each step. As Uncle said: read the documentation or examples when you are confused.
 
.roll is a boolean value, not a real. .pitch and .yaw do not exist as struct members of a Missile. From the documentation:

I am not familiar with Relativistic Missiles, but as I understand you are supposed to set .curve and .arc which will determine the missile's orientation throughout its trajectory. There is no way to set p/r/y specifically because the system determines what those should be at each step. As Uncle said: read the documentation or examples when you are confused.

I'm already aware of reading the documentation and I already have 2 example maps I'm using as reference, I'm also aware that .roll is a boolean value but I mentioned it to showcase it as such. If said examples or documentations had an answer this thread wouldn't have existed. Moving on, curve or arc is not the solution (arguably, pitch and arc could be deemed the same), but they are sadly not something I could use for this particular ability.

I was not aware it was not possible to adjust the roll sadly using this system, thanks for letting me know, wish I knew it sooner.
 
Last edited:
I'm already aware of reading the documentation and I already have 2 example maps I'm using as reference, I'm also aware that .roll is a boolean value but I mentioned it to showcase it as such. If said examples or documentations had an answer this thread wouldn't have existed. Moving on, curve or arc is the solution (arguably, pitch and arc could be deemed the same), but they are sadly not something I could use for this particular ability.

I was not aware it was not possible to adjust the roll sadly using this system, thanks for letting me know, wish I knew it sooner.
You could always edit the system to be able to do so. I imagine it wouldn't be too difficult to inject a few lines of code that modify those properties, even if done in a janky way.
 
I'm already aware of reading the documentation and I already have 2 example maps I'm using as reference, I'm also aware that .roll is a boolean value but I mentioned it to showcase it as such. If said examples or documentations had an answer this thread wouldn't have existed. Moving on, curve or arc is the solution (arguably, pitch and arc could be deemed the same), but they are sadly not something I could use for this particular ability.

I was not aware it was not possible to adjust the roll sadly using this system, thanks for letting me know, wish I knew it sooner.
That wasn't too difficult, all of the necessary code was in the Missiles script. I added two new variables to the core system, newRoll and newRollRate. I also added a GUI variable called MissileNewRoll which sets newRollRate if you want to use it in GUI.

newRoll is what the Roll starts at and newRollRate is how much it increases every interval. A rate of 0.01 is a good amount for experimenting purposes.

I added comments labeled "UNCLE" to all of the edited code, so if you open the code in Visual Studio you can Control + Find that exact text to quickly find my changes.

Note that this is a "trimmed fat" version of Chopinski's original demo map. I deleted a lot of the optional systems, hopefully nothing important. My GUI tests seem to work fine.
 

Attachments

Last edited:
That wasn't too difficult, all of the necessary code was in the Missiles script. I added two new variables to the core system, newRoll and newRollRate. I also added a GUI variable called MissileNewRoll which sets newRollRate if you want to use it in GUI.

newRoll is what the Roll starts at and newRollRate is how much it increases every interval. A rate of 0.01 is a good amount for experimenting purposes.

I added comments labeled "UNCLE" to all of the edited code, so if you open the code in Visual Studio you can Control + Find that exact text to quickly find my changes.

Note that this is a "trimmed fat" version of Chopinski's original demo map. I deleted a lot of the optional systems, hopefully nothing important. My GUI tests seem to work fine.

Wow this is fire, I will go test it out right away
 
That wasn't too difficult, all of the necessary code was in the Missiles script. I added two new variables to the core system, newRoll and newRollRate. I also added a GUI variable called MissileNewRoll which sets newRollRate if you want to use it in GUI.

newRoll is what the Roll starts at and newRollRate is how much it increases every interval. A rate of 0.01 is a good amount for experimenting purposes.

I added comments labeled "UNCLE" to all of the edited code, so if you open the code in Visual Studio you can Control + Find that exact text to quickly find my changes.

Note that this is a "trimmed fat" version of Chopinski's original demo map. I deleted a lot of the optional systems, hopefully nothing important. My GUI tests seem to work fine.

It's perfect, thank you so much. The trimmed version works perfect, as I was not using the optional systems anyway. Thank you <3
 
Status
Not open for further replies.
Back
Top