Scripts / Make an inaminate object come alive and attack me?

Author
Message
SomeT
9
Years of Service
User Offline
Joined: 24th Mar 2015
Location:
Posted: 25th Mar 2015 12:10
How would I make an inaminate object come alive and attack me? How would I write a simple script in Lua to achieve this? I tried to apply the same scripts as the zombie to an inaminate object but it did not work?
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 25th Mar 2015 13:42
What you mean with come alive? Please be more exact what you mean. Should it follow the player and hurt him if it is near enought? Is it that what you mean? For this you just need 4 commands and some time.

GetPlayerDistance(e)
HurtPlayer(e,Damage)
RotateToPlayer(e)
MoveForward(e)

And for no instand kill:
StartTimer(e)
GetTimer(e)

Thats all
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
SomeT
9
Years of Service
User Offline
Joined: 24th Mar 2015
Location:
Posted: 25th Mar 2015 13:46
Many thanks, yeah that is what I mean follow and attack the player. I tried your code or commands or whatever they do not work, is that valid Lua code or starting points?
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 25th Mar 2015 13:57
That are just starting points No real code
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
SomeT
9
Years of Service
User Offline
Joined: 24th Mar 2015
Location:
Posted: 25th Mar 2015 14:21
help me out please if its not to much trouble
PM
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 25th Mar 2015 14:25
witch object would you have to come alive.
Objects are not animated. as characters.
a little bit more info.

Harry
Harry
PM
SomeT
9
Years of Service
User Offline
Joined: 24th Mar 2015
Location:
Posted: 25th Mar 2015 14:34
Say just a 3d cube or piece of furniture, it does not have to be animated, I just want it to move and hurt the main actor.
PM
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 25th Mar 2015 14:41
Here in the script thread below there are some scripts maybe helpfull for you.
The flying insect script from smallg
Is something you can adjust.

Gr
Harry
PM
SomeT
9
Years of Service
User Offline
Joined: 24th Mar 2015
Location:
Posted: 25th Mar 2015 14:47
Which script thread below? Can you be more specific please?
PM
SomeT
9
Years of Service
User Offline
Joined: 24th Mar 2015
Location:
Posted: 25th Mar 2015 15:07
Actually found it
PM
HarryWever
3D Media Maker
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location: below Sea level
Posted: 25th Mar 2015 15:08
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 25th Mar 2015 15:23
Did it help you?
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 25th Mar 2015 15:37
I wrote a working script with a lot of explaination, if you want it, I will post it.
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
SomeT
9
Years of Service
User Offline
Joined: 24th Mar 2015
Location:
Posted: 27th Mar 2015 18:41
Yes, but if you look at forum post:

https://forum.game-guru.com/thread/211321

I still am having trouble with it, its become complicated?
PM
Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 28th Mar 2015 13:44 Edited at: 28th Mar 2015 13:44
Give the entity strength above 0 and wrote something in

thats it
My dream is to develope games, which makes fun when I create it and fun when other people play it.
PM
SomeT
9
Years of Service
User Offline
Joined: 24th Mar 2015
Location:
Posted: 28th Mar 2015 21:51
Way above 0 in the .fpe file:

;statistics
strength = 25

therefore it must be something else or perhaps I have not understood you correctly, if thats the case could you explain in a simpler way, I am still a beginner to this software.
PM

Login to post a reply

Server time is: 2024-05-06 09:19:35
Your offset time is: 2024-05-06 09:19:35