Home   Help Search Login Register  

Author Topic: animated textures for drop-particles  (Read 4298 times)

0 Members and 1 Guest are viewing this topic.

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:animated textures for drop-particles
« Reply #15 on: 29 May 2005, 20:23:53 »
nono - lean bear, you misunderstand me!
the wings and the mosquito are one texture file, applied to a simple, flat plane. the animation is the sequence of the textures - that does not work.
a grown-out config-scripted animation would be a bit too much for such a tiny, nasty gnat IMO ;)

for a better understanding i've put it all in a separate pbo, together with the script i'd like to use.  see attachment
start the script by placing a trigger on a map, Activation: anybody, OnActivation: [] exec "\mosquito\mosquitos.sqs", then walk straight into the covered zone and the gnats should appear around you ;)

for having a closer look at the mosquito itself put this e.g. in the onactivation field:
Code: [Select]
drop ["\mosquito\mosquito", "", "Billboard", 1,  20, [getpos player select 0 , getpos player select 1, 1], [0,0,0],  1,     1.275,  1,  0, [1,1], [[1,1,1,1], [1,1,1,1], [1,1,1,0.6], [1,1,1,0]], [0],   0,   0,   "",    "",     "player"]
//edit: vektorboson told me that AnimationName stands for an animation class of a vehicle. so if you have a car with openable doors and drop-create it, you can thereby difine if the doors shall be open or not e.g. - if i understood him right.
« Last Edit: 29 May 2005, 20:29:23 by remcen »
we're looking for members: IM:UC MOD

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:animated textures for drop-particles
« Reply #16 on: 29 May 2005, 21:01:33 »
I was looking at kasna.p3d in Oxygen, and especially the face that had the kasna_voda.01.paa applied.

I also looked at the optika_night.p3d and the face that had the night_sum.01.paa applied.

In both cases the user number in the face properties was 1, I'm not even sure if this makes any difference to anything, just thought I would point it out.   ;D

The user number on your 2 faces is 0 btw.


Planck
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:animated textures for drop-particles
« Reply #17 on: 29 May 2005, 22:47:00 »
I had a look at the addon.

I'm sure this was just something you missed when you put it in a folder called "mosquito", but the mostquito's looked more like paper ones to me ;)

So, I quickly tidied that up and went back in-game.

The mosquitos looked pretty good, and personally, I don't think it would matter if they were animated or not as they're so small anyway. I'm sure Planck had to squint real hard to see them ;)

But after a while, I was that they weren't animated and just flew around. The problem seems to be in the script. Where you've put "
  • ", the 6th part of the array from the end is actually the most important for the animation to work. Its the animation phase. Set to 0 means no animation :P 1 means animated. So, [0,1] would mean they would start off on whatever texture they're set at (prob mosqu.01.paa) and animate through all the numbers (mosqu.02, mosqu.03 etc.) until it reaches the end. Then it would start again.


I put [0,1,0,1] just to be sure :P

edit

The stupid forum code makes the "0" in between this [ and this ] make it look like this
  • :P


btw I understood a lot better where you were coming from after seeing the addon itself :)
« Last Edit: 29 May 2005, 22:50:54 by Lean Bear »

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:animated textures for drop-particles
« Reply #18 on: 30 May 2005, 00:44:31 »
YES!! it works - in principle.
replace the [0,1,0,1] by [0,1,2,0,1,2,0,1,2] and it works perfectly for one particle. all three different textures are displayed and the repetition makes the animation faster - and that's the next unsolvable question: a script drop-creating one gnat every 0.1 seconds living for 2 seconds makes ofp crash instantly ;D

but thanks alot to you two guys :D

i'll tweak the script tomorrow, make the animation slower, see what changes to lifetime adds to playability and make the script create the particles only in front of the player.
« Last Edit: 30 May 2005, 00:45:29 by remcen »
we're looking for members: IM:UC MOD

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:animated textures for drop-particles
« Reply #19 on: 30 May 2005, 00:51:58 »
OK......Great

Glad you got it working.  ;D ;D


Planck
I know a little about a lot, and a lot about a little.

Lean Bear

  • Guest
Re:animated textures for drop-particles
« Reply #20 on: 30 May 2005, 12:18:00 »
Glad you got it working :D

I'm surprised [0,1,2,0,1,2,0,1,2] actually works. I didn't think that 2 would be recognised by OFP as 0 = no animation and 1 = animated. What does 2 mean? :P

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:animated textures for drop-particles
« Reply #21 on: 30 May 2005, 13:19:53 »
it means that the first three textures are displayed as far as i reckon. when i inserted [0,1,2,3] a white plane was displayed when '3' was due-
obviously it has nothing to do with animated or not - even though i also thought it has due to vektorboson's tutorial ;)

i think [0,2] will be enough for my purposes here, cos 0 (=mosquito.01.paa) has the wings in the rear position and 2 (=mosquito.03.paa) has it in the very front position.
i'll post the completed addon here as soon as it is playable. will be also available in one of the next im:uc releases :)

//edit: bummer -- all test with animated textures failed. either game freeze or crashtodesktop.
so i have to use non-animated textures for obvious reasons  :P
« Last Edit: 30 May 2005, 14:01:24 by remcen »
we're looking for members: IM:UC MOD

Lean Bear

  • Guest
Re:animated textures for drop-particles
« Reply #22 on: 30 May 2005, 17:16:11 »
I don't think the [0,1,2,3...etc] will work (probably the cause of the ctds you are experienceing).

I have various animated particle effects that I use in some of my addons with up to 20 animated textures, all of which have worked with merely [0,1,0,1,0,1].

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:animated textures for drop-particles
« Reply #23 on: 30 May 2005, 20:29:49 »
well... no and yes ;)
1. the CTDs were due to a stupid beginner's mistake of mine: i put a zero in for the timerperiod parameter.
2. first i put an additional texture into the folder which was identical with the first one. i thought the animation needs it to run smoothly. it actually doesn't but it let me wrongly think that something was wrong with the animationphase-array so i changed it to [0,1,2].
it works the same way with [0,1] as LB correctly said. perhaps ofp simply ignores the '2'.
ok, i'll make the mosquitos a bit slower, cos some of them really shoot around like rockets and post the finished mini addon here.
« Last Edit: 30 May 2005, 20:30:34 by remcen »
we're looking for members: IM:UC MOD