Script-triggers + transparency

Talk about your new mod or map here

Moderators: jelco, bert_the_turtle

amandioc2
level1
level1
Posts: 45
Joined: Thu Jul 27, 2006 3:27 am

Script-triggers + transparency

Postby amandioc2 » Tue Sep 19, 2006 1:35 am

I have 3 questions:
1. Is there a way to make a script repeat at fixed time intervals?
2. Is it possible to create a script-trigger which can be triggered more then once?
3. Can a shape be painted with transparent textures?

Thank you

Amandio
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Re: Script-triggers + transparency

Postby xander » Tue Sep 19, 2006 1:46 am

amandioc2 wrote:1. Is there a way to make a script repeat at fixed time intervals?

Not really. If you would explain what it is that you are trying to do, I might be able to help you come up with a work around.

amandioc2 wrote:2. Is it possible to create a script-trigger which can be triggered more then once?

No. But there may be a way to simulate the effect, if I knew what you were doing.

amandioc2 wrote:3. Can a shape be painted with transparent textures?

Not really. A polygon is either colored, or non-existant. Again, if I knew what you were trying to do, I might be able to help you come up with something.

Basically, explain what you are trying to do, and we might be able to help.

xander
amandioc2
level1
level1
Posts: 45
Joined: Thu Jul 27, 2006 3:27 am

Postby amandioc2 » Tue Sep 19, 2006 5:30 am

Hi Xander, thanks for your help.
I want to have several highlights shining randomly.
I suppose I can build 100 copies of a script and have an invisible creature trigger them, but was wandering if there is a simpler method.
As for the 3rd question, I wander if it's possible to build a building and/or creature painted with the animated transparencies of the fences. Or alternatively, if the fences can be changed to be a single plane with the shape, say, a darwinian.

Amandio
daset
level3
level3
Posts: 348
Joined: Sat Sep 24, 2005 12:56 am

Postby daset » Tue Sep 19, 2006 6:49 am

<snip>
Last edited by daset on Sun Jun 03, 2007 6:58 am, edited 1 time in total.
User avatar
xander
level5
level5
Posts: 16869
Joined: Thu Oct 21, 2004 11:41 pm
Location: Highland, CA, USA
Contact:

Postby xander » Tue Sep 19, 2006 3:43 pm

amandioc2 wrote:Hi Xander, thanks for your help.
I want to have several highlights shining randomly.
I suppose I can build 100 copies of a script and have an invisible creature trigger them, but was wandering if there is a simpler method.

You might try doing this:
Create a very long script that highlights buildings. Put some time delays into it. Have it be triggered by a script trigger as soon as you enter the level. It should run as long as you are in the level. Create many copies of this script trigger, and put them all in the level, as well. When you enter the level, the script trigger with the lowest ID will be executed, and no other scripts will be executed until that one is done. As soon as it finishes, the next script trigger will go off, and so on.

The problem that you would have with this approach is that no other scripts could run -- they would never get high enough into the queue. Basically, there is not a good way to do what you are trying to do. However, if it is only being used for a cutscene, or something like that, it could be made to work, I suppose.

amandioc2 wrote:As for the 3rd question, I wander if it's possible to build a building and/or creature painted with the animated transparencies of the fences. Or alternatively, if the fences can be changed to be a single plane with the shape, say, a darwinian.

You can change the texture used on a fence, as daset explained. You will need to look in the textures/ directory of the data/ directory (what you get when you extract main.dat cum main.rar). The textures you will need to change are laserfence.bmp and laserfence2.bmp. Be carefull, however, because these two textures are used all over the game. For instance, laserfence.bmp is also used in trunkports.

Shapes, on the other hand, cannot be textured. The polygons are flat shaded. A polygon is either a singe, solid color, or it is invisible because it doesn't exist :)

xander
amandioc2
level1
level1
Posts: 45
Joined: Thu Jul 27, 2006 3:27 am

Postby amandioc2 » Fri Sep 22, 2006 10:20 pm

Thank you for the detailed help.
I guess it's more flexible to scatter several copies of the script around the landscape and let the creatures trigger them.
Or maybe to create on a smalll distant island a sort of AI farm to do the trick. :)

Return to “Mod Projects”

Who is online

Users browsing this forum: No registered users and 5 guests