Scripts / Loop animation without physx.

Author
Message
OldPMan
3D Media Maker
16
Years of Service
User Offline
Joined: 10th Aug 2008
Location:
Posted: 27th Oct 2015 11:59
Hi!
I made a model of a wall with a fan and as a beginner in the Lua script I wrote this script here. He works.




But when I use the Pre-bake lightmap, animation fan stops. I shared walls and a fan. But now the fan falls to the floor. I do not know how to overcome it. Maybe someone tell me the correct way is to avoid it?


HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 27th Oct 2015 12:40 Edited at: 27th Oct 2015 12:43
did you try isimmobile = 1 in the fpe file.

edit( if you change it in the fpe, make sure you delete the old bin and dbo files and restart GG)

Harry
Harry
PM
OldPMan
3D Media Maker
16
Years of Service
User Offline
Joined: 10th Aug 2008
Location:
Posted: 27th Oct 2015 12:58
Yes, I tried it and delete DBO and BIN, animation in this version does not play for some reason, perhaps because my Lua creak too simple, and I do not know how to run the animation from Lua?
OldPMan
3D Media Maker
16
Years of Service
User Offline
Joined: 10th Aug 2008
Location:
Posted: 27th Oct 2015 13:05 Edited at: 27th Oct 2015 13:05
This my FPE


;Header
desc = fan
;visualinfo
textured = walls_D.dds
effect = effectbank\reloaded\entity_basic.fx
castshadow = 0
transparency = 1
cullmode = 1
;Orientation
model = fan.X
offx = 0
offy = 0
offz = 50
rotx = 0
roty = 0
rotz = 0
defaultstatic = 0
materialindex = 3
notanoccluder = 1
isimmobile = 1
;statistics
strength = 25
explodable = 0
debrisshape = 1
;AI
aimain = loop.lua
;Spawn
spawnmax = 0
spawndelay = 0
spawnqty = 0
;anim
animmax = 1
anim0 = 0,100
playanimineditor = 1
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 27th Oct 2015 14:18
Try setting physics to 0.
Gtox
3D Media Maker
10
Years of Service
User Offline
Joined: 5th Jun 2014
Location: South Africa
Posted: 27th Oct 2015 14:18 Edited at: 27th Oct 2015 14:24
Edit : sorry double post
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 27th Oct 2015 16:46 Edited at: 27th Oct 2015 16:46
This is my fpe file for my table fan.



as you see i don't use a lua file if i want the animation Always run.
Just playanimineditor = 1.

And if you use a lua file, then i think what gtox said.. turn physics off, or collision to off (11) for the fan.

Harry
Harry
PM
OldPMan
3D Media Maker
16
Years of Service
User Offline
Joined: 10th Aug 2008
Location:
Posted: 27th Oct 2015 18:32
Thanks for the advice Gtox and Harry !

Harry. Unfortunately your file "FPE" only works in realtime shadows. For the "Pre-bake" lightmapping fan frozen. I play around with your "FPE". And I turned out such an option here.
And it works in realtime and "Pre-bake" ligntmapping.

Bored of the Rings
GameGuru Master
19
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 27th Oct 2015 20:04
Also try setting anim0 to 1,100 I found 0 can cause entities disappearing but that was my own experience
Professional Programmer: Languages- SAS (Statistical Analysis Software) , C++, SQL, PL-SQL, JavaScript, HTML, Darkbasic Pro (still love this language), Purebasic, others
Hardware: Dell Precision 490; AMD Radeon HD 7570; LG TFT monitor (widescreen). Wanting a new PC at some point.
Interests: Drumming, Saxophone, Art, Theatre, Music.
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 27th Oct 2015 20:29
Quote: "aimain = ai_charge.lua"

???

3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics

PM

Login to post a reply

Server time is: 2024-12-22 07:10:58
Your offset time is: 2024-12-22 07:10:58