Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Updated]Invisible AMFP meshes? (And Other Questions)
Mudbill Offline
Muderator

Posts: 3,829
Threads: 59
Joined: Apr 2013
Reputation: 177
#41
RE: Invisible AMFP meshes? (And Other Questions)

That looks very clustered. I suggest using the parameter variables. For example use:

PHP Code: (Select All)
void ResetWine(string &in asParentstring &in asChildint alState)
{
    
AddTimer(asParent3"TimerResetWine");
}

void TimerResetWine(string &in asTimer)
{
    
ResetProp(asTimer);


Doing it like this would make the script much shorted but achieve the same. Instead of using absolute names, it will reference to the current value of asParent / asTimer, which at runtime will be the entity currently used to call the events.

Anyway, have you tried, instead of using ResetProp, to use the CreateEntityAtArea? Perhaps you can just create new bottles at defined areas instead? Broken props may not want to reset, as they might be considered non-existant.

(This post was last modified: 08-14-2014, 10:35 PM by Mudbill.)
08-14-2014, 10:34 PM
Find Reply
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#42
RE: Invisible AMFP meshes? (And Other Questions)

Mudbill Wrote:Perhaps you can just create new bottles at defined areas instead? Broken props may not want to reset, as they might be considered non-existant.
Yeap. A broken entity disappears forever. You can't reset it (I tried).
I had to create new entities just like mud says.

08-15-2014, 01:12 AM
Find Reply
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#43
RE: Invisible AMFP meshes? (And Other Questions)

(08-14-2014, 10:34 PM)Mudbill Wrote: That looks very clustered. I suggest using the parameter variables. For example use:

PHP Code: (Select All)
void ResetWine(string &in asParentstring &in asChildint alState)
{
    
AddTimer(asParent3"TimerResetWine");
}

void TimerResetWine(string &in asTimer)
{
    
ResetProp(asTimer);


Doing it like this would make the script much shorted but achieve the same. Instead of using absolute names, it will reference to the current value of asParent / asTimer, which at runtime will be the entity currently used to call the events.

Anyway, have you tried, instead of using ResetProp, to use the CreateEntityAtArea? Perhaps you can just create new bottles at defined areas instead? Broken props may not want to reset, as they might be considered non-existant.

I prefer using absolute names as you put it. I know it's cluttered but for some reason having everything laid out as plain as possible makes it easier to work with, even if it does leave me with long ass scripts. Anyway, thanks. I went to bed after posting and my last thoughts were to just use createentityatarea scripts. I should've got up and edited my post lol.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
08-15-2014, 02:42 AM
Find Reply
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#44
RE: Invisible AMFP meshes? (And Other Questions)

Update: I tried doing the createentityatarea trick and it didn't work. However By turning on the debug mode I saw that it was giving a warning when I started the map that the bottles referenced in the callback didn't exist. Seems adding my collide callback to the OnStart was causing the issue. Now I have the collide callback get created each time a new bottle is spawned and it's working beautifully. I guess the system can't handle a callback being created before the entity the callback needs exists.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
08-16-2014, 08:31 PM
Find Reply
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#45
RE: Invisible AMFP meshes? (And Other Questions)

New question: How do I make an object float? I've played custom stories with objects that have no gravity and if you grab it and throw it it just sorta floats away. I'm trying to do that. I unchecked the "has gravity" box in the model editor but that did nothing. I tried doing a search but I can only find stuff about floats in terms of scripting.

Edit: Sigh, nevermind. Apparently the object needs to have a mass more than 0 before it will float around. Sorry.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
(This post was last modified: 08-17-2014, 02:30 AM by DeAngelo.)
08-17-2014, 02:16 AM
Find Reply
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#46
RE: Invisible AMFP meshes? (And Other Questions)

Could someone check something for me? I'm trying to use the cot from AMFP but I'm having trouble. It shows up fine in both the model editor and level editor, but once I'm in-game it's invisible. I can tell it's there though since walking to where it should be stops my character. I tried doing a search but apparently Cot is too short of a word to qualify for a search. Blegh.


Attached Files
.rar   ALNDcot.rar (Size: 615.14 KB / Downloads: 2)

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
09-04-2014, 02:19 PM
Find Reply
Mudbill Offline
Muderator

Posts: 3,829
Threads: 59
Joined: Apr 2013
Reputation: 177
#47
RE: Invisible AMFP meshes? (And Other Questions)

Have you made sure it's not just a .map_cache file fooling you?

09-04-2014, 02:43 PM
Find Reply
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#48
RE: Invisible AMFP meshes? (And Other Questions)

(09-04-2014, 02:43 PM)Mudbill Wrote: Have you made sure it's not just a .map_cache file fooling you?

Not possible because A: I have the loading of map_cache files disabled and B: if it was a cache issue then the collision wouldn't exist. I did go ahead and check for it just in case and it is indeed not the issue.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
09-04-2014, 02:46 PM
Find Reply
Mudbill Offline
Muderator

Posts: 3,829
Threads: 59
Joined: Apr 2013
Reputation: 177
#49
RE: Invisible AMFP meshes? (And Other Questions)

Even when I disable caches, they still appear. I'm guessing they don't go into effect, but they're there anyway. I have experienced collision boxes being present when the model isn't because of caches. Either that or maybe the model has no body assigned and is located at co-ords 0,0,0.

09-04-2014, 04:09 PM
Find Reply
DeAngelo Offline
Senior Member

Posts: 263
Threads: 26
Joined: Feb 2013
Reputation: 11
#50
RE: Invisible AMFP meshes? (And Other Questions)

Not really sure how to assign bodies. I've edited dozens of models and I always just added some shapes, selected them and picked to create body. My problem must have something to do with my ent file because I tried putting the cot.DAE in as a static object and it was able to show up just fine. Meh, my use doesn't really require the player to be able to interact with the cot so I'll probably just leave the static object version in there and call it a day.

A Late Night Drink http://www.moddb.com/mods/a-late-night-drink
Check out my LP channel, CatBearGaming, I take all Custom Story requests!
09-04-2014, 09:27 PM
Find Reply




Users browsing this thread: 1 Guest(s)