Frictional Games Forum (read-only)
Possible to repeat script With.._ - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Possible to repeat script With.._ (/thread-29827.html)

Pages: 1 2


Possible to repeat script With.._ - Amnesiaplayer - 04-15-2015

Is it possible to repeat something, not the WHOLE script but just.. like on func thing, because i have a Cannon, and i want to let it "Shoot" a cannon ball, with propforce etc, and then like, Particle infront of it, so it looks liek it's actually shooting (help here to, is there a particle that looks like a mini explosion?! to use it on the cannon?) so, can i repeat them ALL, because my point is,
you're doing something, and then fell from a high thing, then like, sleep... and then wake up there but you're actually dreaming, and that's a dream palce, where there are 2 castles, fighting each other, with cannons, like you wake up, and see cannon's shooting!
i Actually wanted fog in this, but AMNESIA'S FOG IS *@#%&#$*^
but yeah, so i want to make it repeat, and can i move the player? like make a script, if you can, it owuld be very cool... this is liek a dream, to remember, what happened to you, in World War II...


RE: Possible to repeat script With.._ - FlawlessHappiness - 04-15-2015

Repeat:
Yes. Use timers.
Look up "AddTimer" in the engine scripts.

Particle:
You can make it yourself in the particle editor.

Make player walk:
Yes. Check the engine scripst for that. MovePlayerForward I think it is. It has to be repeated quickly with a timer.

Fog:
Amnesia's fog is not bad. I don't know what problems you have with it.


RE: Possible to repeat script With.._ - Amnesiaplayer - 04-15-2015

(04-15-2015, 02:03 PM)FlawlessHappiness Wrote: Repeat:
Yes. Use timers.
Look up "AddTimer" in the engine scripts.

Particle:
You can make it yourself in the particle editor.

Make player walk:
Yes. Check the engine scripst for that. MovePlayerForward I think it is. It has to be repeated quickly with a timer.

Fog:
Amnesia's fog is not bad. I don't know what problems you have with it.



RE: Possible to repeat script With.._ - Mudbill - 04-15-2015

I don't think they used those kinda cannons during WW2...

But nevertheless, if you want one script that repeatedly fires a cannonball, create a function that does so. Start off with something like

PHP Code:
void FireCannon()
{
    
//Do something.


In there you tell it to create a cannonball entity, push it away, play sounds, particles, use timers to make it work better etc. Then, whenever you need to fire a shot, just call FireCannon();

You do not need to use in-editor cannonballs, because those will run out. You're better off creating one through script.


RE: Possible to repeat script With.._ - Amnesiaplayer - 04-15-2015

(04-15-2015, 07:46 PM)Mudbill Wrote: I don't think they used those kinda cannons during WW2...

But nevertheless, if you want one script that repeatedly fires a cannonball, create a function that does so. Start off with something like

PHP Code:
void FireCannon()
{
    
//Do something.


In there you tell it to create a cannonball entity, push it away, play sounds, particles, use timers to make it work better etc. Then, whenever you need to fire a shot, just call FireCannon();

You do not need to use in-editor cannonballs, because those will run out. You're better off creating one through script.

Oh thanks, i will try it tomorrow!!
but i have another Question, about custom models, i made Spikeball thing, and i want it to let it move (from the script) and i heard you NEED to make the object Statecallback or something like that, what do i have to do?! now, the model works it;'s static, and the only 2 checkbox in "entity" is Affected by decal and something else, can i still make it move (with move, i mean it goes from mid to right, from right to left, from left, to right, from right to left ETC the whole time... can i make something like that in script?! i succesfully made the model, without any tutorials ( i was watching your tutorial, some days ago ) i didn't knew it would work, but yeah, i made a model within 25 min, i'm really happy, the texture also works, and the export etc worked aswell, i made the collision box > body etc, but is it possible to make it move, or do i need statecallbakc, so yeah, how....

Edit-Also : "I don't think they used those kinda cannons during WW2..."
I know xd, but there isn't any other good looking cannon in amnesia Sad and if the "fog" works good, then the you can't see the cannon's really good, because you're standing somehwere where you can't see the 2 cannons beside you, but with fox, i can "hide" the cannon a little bit on the other castle, but the fox is TOOOO much, or i don't know how to make it normal..> (srry for bad English)


RE: Possible to repeat script With.._ - FlawlessHappiness - 04-15-2015

You need to make it an entity with a .ent file and the model editor.


RE: Possible to repeat script With.._ - Mudbill - 04-16-2015

Set the entity type to MoveObject or possibly Object > Static.

You can edit the fog properties of how thick it should be. Play around with the settings. Also, make sure to set a skybox, because empty skies start to glitch with fog.


RE: Possible to repeat script With.._ - FlawlessHappiness - 04-16-2015

(04-16-2015, 01:19 AM)Mudbill Wrote: Set the entity type to MoveObject or possibly Object > Static.

You can edit the fog properties of how thick it should be. Play around with the settings. Also, make sure to set a skybox, because empty skies start to glitch with fog.

Huh?
Skyboxes also look weird if you use fog. Fog doesn't work on a skybox, so only everything else will be fog-ified.

If you use the domes that CarnivorousJellybean made, which are actual objects, then the fog will work.


RE: Possible to repeat script With.._ - Romulator - 04-16-2015

(04-16-2015, 08:55 AM)FlawlessHappiness Wrote:
(04-16-2015, 01:19 AM)Mudbill Wrote: Set the entity type to MoveObject or possibly Object > Static.

You can edit the fog properties of how thick it should be. Play around with the settings. Also, make sure to set a skybox, because empty skies start to glitch with fog.

Huh?
Skyboxes also look weird if you use fog. Fog doesn't work on a skybox, so only everything else will be fog-ified.

If you use the domes that CarnivorousJellybean made, which are actual objects, then the fog will work.

Actually, the use of the skybox, even if it's just a plain black one, stops the background of a map from being really trippy if you have global map fog (not sure about the actual 'fog object', but I know it does have problems from the one in the a Level Settings).the background ends up remembering that something went past, and draws it until the camera is out of its view.

A similar effect can be created in Game Maker when you have an object (with a sprite) which moves around a map which has no background.

We may have just a different interpretation of 'weird' though! Smile


RE: Possible to repeat script With.._ - FlawlessHappiness - 04-16-2015

Ah! The global fog. I was thinking about the one you place.

Yea, the global fog is probably different.