Author Topic: Creating an extreme sensor disturbance...  (Read 2298 times)

0 Members and 1 Guest are viewing this topic.

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Creating an extreme sensor disturbance...
For mission I'm trying to create an effect quite like the sensor disturbances you had in Homeworld during the missions against the kadeshi (when you got to sensors manager [the missions map for those who don't know] there were faked red spots and pings everywhere)

I've tried using 30 stationary fighter-size-objects (15 hostile and 15 unknown; with "protect-ship"- and "hidden-from-sensors"-flags) and these little two events down there in the attachment

it does seem to work nicely apart from the fact that after the first envent had been called all of the of the objects apear to in one region and not all over the place like I want them to be

how to I get them to be all over the place?

INFO: the argument lists includes all 30 objects; the rand-multiple is set to work with a range from 10k to -10k

[attachment deleted by admin]
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Creating an extreme sensor disturbance...
I suspect I know what your problem is here.

You've based the mission around (0,0,0) right. So all the numbers range from high positive values to high negative values. The problem is that the random functions don't deal very well with negative numbers. The game figures out what the difference is between the high and low value you entered by doing this.

Code: [Select]
diff = high - low;
if (diff < 0)
diff = 0;

The game then takes a random number between 0 and the value of diff and adds that the low number. As you can see that calculation will be thrown completely out by the inclusion of negative numbers.

You have two choices.

1) Change

rand-multiple
- -1000
- 1000

into

+
- -1000
- rand-multiple
-- 0
-- 2000


2) Simply pick up and move everything in the mission so your centre point is (1000,1000,1000)  or whatever.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Creating an extreme sensor disturbance...
You've based the mission around (0,0,0) right.

yes, I did...
well now it is 10k,10k,10k and the random functions are ajusted to go from 0 to 20k...
and it works now!

Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!Thank you!


now I only have to find a solution for a related problem ... but since I know the reason why this is screwing up I will find one
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Creating an extreme sensor disturbance...
I suspect that the problem is just a bug left over from the days when all SEXPs had to have positive values for any number. I'll have to check I wouldn't screw anything up if I fix it.

I vaguely remember that I had a chat with Goober about it last time I poked around the rand functions and he gave me a good reason not to fix it. Could be wrong though.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Creating an extreme sensor disturbance...
and I hope there will be a time when rand and rand-multiple will accept negative numbers.... and that this might be soon

having only dealing with positive numbers makes rand-stuff less good sometimes (like in another mission where I'm using a derivate of the events aboth.. but these include altering the facing of some objects and if they just face positive coordinates ... well it does not look as good as when the event would go with the full spectrum of coordinates)

(found the solution to related problem...)
« Last Edit: April 28, 2007, 11:09:45 am by 0rph3u5 »
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Creating an extreme sensor disturbance...
The problem is a case of 5 seconds to fix, but lots of wondering if I've broken something with the fix. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Creating an extreme sensor disturbance...
The problem is a case of 5 seconds to fix, but lots of wondering if I've broken something with the fix. :)

how about it now, kara?
found the time to to deal with it?

I need the negative random numbers fast
---> I'm about to use a derviate the events for the sensor disturbance to create the obtical effect of Jump corridor collapsing in "WotW - Act 1"'s SOC missions; looks silly if only the upper right half of the corridor fills with *stuff*
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Creating an extreme sensor disturbance...
I can take a look. Can't promise anything yet though.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline 0rph3u5

  • 211
  • Oceans rise. Empires fall.
Re: Creating an extreme sensor disturbance...
I can take a look. Can't promise anything yet though.

the first date I would need it is the end of june... so no sweat and no hurry
"As you sought to steal a kingdom for yourself, so must you do again, a thousand times over. For a theft, a true theft, must be practiced to be earned." - The terms of Nyrissa's curse, Pathfinder: Kingmaker

==================

"I am Curiosity, and I've always wondered what would become of you, here at the end of the world." - The Guide/The Curious Other, Othercide

"When you work with water, you have to know and respect it. When you labour to subdue it, you have to understand that one day it may rise up and turn all your labours into nothing. For what is water, which seeks to make all things level, which has no taste or colour of its own, but a liquid form of Nothing?" - Graham Swift, Waterland

"...because they are not Dragons."