Scroller.py with alpha objects?

hi everybody

im having some trouble with the scroller.py script for the GE, basically i cant get the script to work with alpha objects, which is really annoying because if i make the object opaque it looks terrible. is there somthin i could add to the script or prehaps another script wich could help me?
thanks for any help, cya’ll later

I use this script and it works in 2.47 (remember to make a speed property and set it to a value like .002). No problems with alpha

import GameLogic
from math import *

Always sensor to python

requires speed property

Own = GameLogic.getCurrentController().getOwner()
Mesh = Own.getMesh()
len = Mesh.getVertexArrayLength(0)
speed = Own.speed / 2

vertexindex=0
while vertexindex < len:
vertex = Mesh.getVertex(0,vertexindex)
uv=vertex.getUV()

setting “U” (X)

#uv[0] = uv[0]+ speed

setting “V” (Y)

uv[1]=uv[1]+ speed
vertex.setUV(uv)

go to next vertex and set its UV coord

vertexindex = vertexindex+1

ok thanks for that, but what is a speed property?

It determines how fast it goes. :slight_smile:

yeah lol! but what i meant was how do i add one? :stuck_out_tongue:

Add a property on the object that is called ‘speed’ and set it to float. =D

press the large button called ‘Add Property’ to the left of the Logic blocks and rename the ‘prop’ value to ‘speed’, then change the number or 0.000 value to something meaningful. I recommend 0.02 to start with … but then … go WILD!!! maybe 0.03!!! :slight_smile: :slight_smile:

hmm…this is really unfair- it still dosent work! ive got a pic of my setup here, what am i doing rong?
(this is going to be an abvious mistake, i can tell)

Attachments


OK here is a quick blend I cobbled together
http://www.weedyworld.co.uk/blender/scroller.blend
hope it helps

ok thanks, ill see if i can work it in!