You are not logged in.    Login    New User    Forum Home    Search

Location:
JBPLAY  \  Meteor 2  \  Suggestions  \  Random Projectile Sprites

Back to Threads

Viewing Thread: Random Projectile Sprites

 

shockdrop

Joined: 01 March 2005
Posts: 236
18 September 2005 10:54 (UK time)

Like it says. I have some cool fire sprites but i need it to show randomly or it dosent look that good.




YOU PEOPLE ARE ALL STRANGE!

You need to login to create posts in this thread.

arezey

Joined: 16 June 2005
Posts: 1599
18 September 2005 12:09 (UK time)

Well, you can have a random fire spriting script but it's <b>very</b> complicated.
And this works the best for crates!

Well, if you have a crate with Id of 2 with positions 40,40 and has it's other ends at 80,80.

Script this:

void OnObjectDie_2()
{
SC_AddSprite("effects\\fire.spr",SC_Random(40,80),SC_Random(40,80),0,0);
}

Complicated, huh? Non-tested.

You need to login to create posts in this thread.

Assain

Joined: 02 November 2003
Posts: 979
18 September 2005 14:53 (UK time)

I need to learn the M2 script commands again... i havetn done any mapping for a long time.... XP

You need to login to create posts in this thread.

arezey

Joined: 16 June 2005
Posts: 1599
18 September 2005 15:14 (UK time)

Yep.

Have you used "for" command anytime? That one can help you the reduce the filesize as the for can choose multiple objects at once.

It works like this:

void MyCode()
{
int i;

for(i=11; <=45; ++i);
{
//some script for example:
SC_SetObjectHidden(i,0); //unhides all objects range 11-45
}
}

A nice command in your disposal

I used it to throw 25 troops over 1 5000x5000 map. Woah, it's hard because you can't know where the troops are, they are always at different coords!

Edited: 18 September 2005 15:18


You need to login to create posts in this thread.



Forums system (C) 1999-2023 by James Bunting.

Terms of Use