Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Models and Media / help making ghosts

Author
Message
GLI Games
17
Years of Service
User Offline
Joined: 12th Mar 2007
Location: Fontana CA
Posted: 6th Nov 2007 04:36
I am trying to create transparent enemies for a game. I found a board that had something like this mentioned in it, but when I try what it say, it wont work. It says to add thew following line to the main script under triggers:

:setalphafade=50

Nothing happens when I do this however. Keep in mind, I am a total noob at fpi scripting. This is my first attempt at any kind of scripting. Can someone help me out? Thanks.

Note: I have attached the script I was trying to do with the added changes, so maybe someone can correct them and send me the new file.

Visit us on the web at http://www.gli-games.co.nr/

Attachments

Login to view attachments
Colon
17
Years of Service
User Offline
Joined: 5th Mar 2007
Location:
Posted: 6th Nov 2007 06:46
cant you just set the transparency to like 50 or some thing?


Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 6th Nov 2007 07:51 Edited at: 6th Nov 2007 08:07
Quote: "set the transparency to like 50 or some thing"


Isn't the transparency setting a boolean value ( 0=off , 1=on ) ?


Quote: ":state=0:runfpidefault=1"

Isn't that calling itself if this is the Main AI ???
It seems to me that this would create and endless loop in state=0, because it calls itself (starts over) before it gets to state=1

Don't forget to visit Conjured Entertainment

GLI Games
17
Years of Service
User Offline
Joined: 12th Mar 2007
Location: Fontana CA
Posted: 6th Nov 2007 07:57
Hmmm...i tried that, but it don't seem to work. any other suggestions?

Visit us on the web at http://www.gli-games.co.nr/

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 6th Nov 2007 08:13 Edited at: 6th Nov 2007 09:07
The problem is the character itself.
If you try the ...
::setalphafade=50

On a regular entity, then it works fine.

The AltTexture doesn't work right with Characters either. (at least not for me)

If you open the character's FPE file and change the ISCHARACTER to ...

ischaracter = 0

then the transparency will work.

Don't forget to delete the characters .bin and .dbo files for the change to take effect.

I just tested it by editing the COWARD script by adding the
::setalphafade=50
to the top of it and left the rest alone. ( I edited a copy of it and put it in my user folder )

Disregard the transparency setting because you can leave that at its default of 0.

The transparency works, but that's about it.
I am not sure if the ghost will be able to use a weapon now he is not an official character. (you need a new script)
You could have it inflict damage though by detecting his proximity to the player.
plrdistwithin=50:plraddhealth=-10

But then again, I don't think that ghosts have guns anyway.
Now the problem is that the movefore action only works on characters, so the ghost can't move.
Well, maybe it can using waypoints.
Hope this makes sense and helps.

Don't forget to visit Conjured Entertainment

Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 6th Nov 2007 09:28
a surefire way to do it is to make the texture a .dds with an alpha map. This way you can also control the severity of the translucency.


GLI Games
17
Years of Service
User Offline
Joined: 12th Mar 2007
Location: Fontana CA
Posted: 6th Nov 2007 12:12
Quote: "a surefire way to do it is to make the texture a .dds with an alpha map. This way you can also control the severity of the translucency.
"


How would I pull that off?

Visit us on the web at http://www.gli-games.co.nr/

GLI Games
17
Years of Service
User Offline
Joined: 12th Mar 2007
Location: Fontana CA
Posted: 6th Nov 2007 13:54
Quote: "The problem is the character itself.
If you try the ...
::setalphafade=50

On a regular entity, then it works fine.

The AltTexture doesn't work right with Characters either. (at least not for me)

If you open the character's FPE file and change the ISCHARACTER to ...

ischaracter = 0

then the transparency will work.

Don't forget to delete the characters .bin and .dbo files for the change to take effect.

I just tested it by editing the COWARD script by adding the
::setalphafade=50
to the top of it and left the rest alone. ( I edited a copy of it and put it in my user folder )

Disregard the transparency setting because you can leave that at its default of 0.

The transparency works, but that's about it.
I am not sure if the ghost will be able to use a weapon now he is not an official character. (you need a new script)
You could have it inflict damage though by detecting his proximity to the player.
plrdistwithin=50:plraddhealth=-10

But then again, I don't think that ghosts have guns anyway.
Now the problem is that the movefore action only works on characters, so the ghost can't move.
Well, maybe it can using waypoints.
Hope this makes sense and helps."


This works great for what I am doing. Now, how do I stop the character from bleeding as well as prevent it from creating a blood splatter decal? I don't need my ghosts to bleed.

Visit us on the web at http://www.gli-games.co.nr/

GLI Games
17
Years of Service
User Offline
Joined: 12th Mar 2007
Location: Fontana CA
Posted: 6th Nov 2007 14:09
Quote: "You could have it inflict damage though by detecting his proximity to the player.
plrdistwithin=50:plraddhealth=-10"


Where do I put this in the script?

Visit us on the web at http://www.gli-games.co.nr/

GLI Games
17
Years of Service
User Offline
Joined: 12th Mar 2007
Location: Fontana CA
Posted: 6th Nov 2007 14:19 Edited at: 6th Nov 2007 16:21
I added plrdistwithin=50:plraddhealth=-10 to my script, but now, the walls disappear in the area that the enemy is in.

Visit us on the web at http://www.gli-games.co.nr/

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 6th Nov 2007 17:19 Edited at: 6th Nov 2007 17:28
WOW, a quad post.
Dude, take note of that EDIT button for your posts.
It's right there under your name and icon. lol

Quote: "This works great for what I am doing. Now, how do I stop the character from bleeding as well as prevent it from creating a blood splatter decal? I don't need my ghosts to bleed."

Look in the characters FPE file for...

;decals
decalmax = 2
decal0 = red
decal1 = blood

...and edit those like so...

;decals
decalmax = 2
decal0 =
decal1 =


Once again you will need to delete his .bin and .dbo files for the changes to take place.

Quote: "I added plrdistwithin=50:plraddhealth=-10 to my script, but now, the walls disappear in the area that the enemy is in."

I would have to see the script to get an idea of what is going wrong.
It is hard to determine the problem without seeing the structure of the script.


Quote: "a surefire way to do it is to make the texture a .dds with an alpha map. This way you can also control the severity of the translucency."

I've never tried that disturbing13.
What program do you use to edit your DDS files?
Does that work for characters?
If so, then that is a far better method than what I suggested.

Don't forget to visit Conjured Entertainment

GLI Games
17
Years of Service
User Offline
Joined: 12th Mar 2007
Location: Fontana CA
Posted: 6th Nov 2007 17:27
Quote: "I would have to see the script to get an idea of what is going wrong.
It is hard to determine the problem without seeing the structure of the script.
"


Here is my test script. It is attached to this post.

Visit us on the web at http://www.gli-games.co.nr/

Attachments

Login to view attachments
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 6th Nov 2007 17:32
First off, I said you will need a new script, because you need to get rid of all those weapon references.

Second, you have to learn the basics of FPI scripting ...


::setalphafade=25:plrdistwithin=50:plraddhealth=-10

...is all wrong.
You should never have more than two (2) colons per state.

What is it exactly that you want your ghost to do?
Maybe I can help you on a new script, if it is not too complicated.

Don't forget to visit Conjured Entertainment

GLI Games
17
Years of Service
User Offline
Joined: 12th Mar 2007
Location: Fontana CA
Posted: 6th Nov 2007 18:04 Edited at: 6th Nov 2007 21:16
Quote: "First off, I said you will need a new script, because you need to get rid of all those weapon references.

Second, you have to learn the basics of FPI scripting ...


::setalphafade=25:plrdistwithin=50:plraddhealth=-10

...is all wrong.
You should never have more than two (2) colons per state.

What is it exactly that you want your ghost to do?
Maybe I can help you on a new script, if it is not too complicated."


Sorry about that. As I said before, I am totally new to scripting. This is my first time ever even attempting to script something.

Basically, I want the enemy to be transparent like a ghost and inflict damage when the player comes in contact.

If this is possible, I would also like it to be able to move and attack like a normal enemy. Lastly, I would like it to be a non-solid (able to pass through it).

I have seen all of these done in other posts separately, but when I try to script it myself all into a single script, all kinds of undesired effects take place. Missing walls, one effect gets canceled out, a complete or partial absence of all entities or segments,the enemy is knocked over when come in contact with, or even none of the effects take place at all

Anyway, for the most part I just need transparency, but if possible, I would like to see normal movement and attacks along with the possibility of a sort of pass-though effect.

On another note, is levitation possible? This is in no way an absolute requirement, but I would like to pull it off if it is. Basically, whatever you can help me make happen out of my requests with this script, I will be more than thankful for.

Thanks again for the help, and sorry if I am difficult. I am just so new to this.

Visit us on the web at http://www.gli-games.co.nr/

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 6th Nov 2007 21:51 Edited at: 6th Nov 2007 22:16
Scrap everything I has said before, except for the blood part.

I just tried what disturbing13 suggested and it works great without editing the FPI scripts at all.

I can tell you how to do it using Paint.NET, which is a free paint utility.

Here is the method step by step.

1) Make a copy of the texture you want to make a ghost.

2) Rename the original to something else. (you can just add "_original" to the end of its name or something)

3) Open up the copy in Paint.NET

4) Click LAYERS, then click LAYER PROPERTIES, then adjust the OPACITY SLIDER and hit OK

5) Click FILE then SAVE AS then name the file the same name the original use to be and change the file format to TGA then click SAVE

6) Untick the COMPRESS (RLE) checkbox and leave it as 32 bit (it may work compressed but I have not try that yet) then hit OK

If you save it as the same name as the old file and placed it in the same folder then you are good to go once you delete his .bin and .dbo files.
With this method you can leave him a character, which means he can move, strafe, wield weapons, and use the stock scripts.

Have Fun

Don't forget to visit Conjured Entertainment

Disturbing 13
19
Years of Service
User Offline
Joined: 12th Apr 2005
Location: Murder Capital of the World
Posted: 6th Nov 2007 22:09
I use a free program called DXTBmp. It requires 2 pictures, theaccual texture and the alpha map. The alpha map should be white in spots you want to show up fully, grey for transparent(darker grey = more transparent), and black for holes not drawn at all. And yes it works on my chracters. here is a pic.

the head is visible inside the cage because of the squares that have a black alpha map. With some creativenes you can make a ghost that is transparent and gets more transparent as it reaches the floor.


creator of zombies
18
Years of Service
User Offline
Joined: 16th Feb 2006
Location: UK: West Wales
Posted: 7th Nov 2007 22:22
@Disturbing 13: Nice character D13.



Login to post a reply

Server time is: 2024-11-19 20:16:28
Your offset time is: 2024-11-19 20:16:28